SqlScriptDOM icon indicating copy to clipboard operation
SqlScriptDOM copied to clipboard

Exposing Generator Visitor

Open Stefan-Puskarica opened this issue 1 year ago • 2 comments

Could we consider exposing the generator visitor classes as public classes to allow people to fine tune generation. This would make it so if someone really desires they can generate something using a certain format and we don't need to have an extremely extensive list of generator options to choose from

Stefan-Puskarica avatar Oct 07 '24 06:10 Stefan-Puskarica

I am in particular need of this feature and can try implementing it. My use case is canonical 'pretty print' of SQL code, and, specifically, following collation-based rule (CI/CS, AI/AS) for identifier handling, so that I can e.g. lower-case all identifiers when a CI collation applies. I can see several alternatives:

  • Expose the generator visitor classes as public and allow overriding methods
  • Expose the ScriptWriter and allow overriding its methods
  • Add an enum IdentifierCasing setting allowing PreserveOriginal, LowerCase, UpperCase options

ondrejtucny avatar Oct 24 '25 13:10 ondrejtucny

This issues seems to be a superset of #42

ondrejtucny avatar Oct 24 '25 13:10 ondrejtucny