microsoft / SqlScriptDOM

ScriptDOM/SqlDOM is a .NET library for parsing T-SQL statements and interacting with its abstract syntax tree
MIT License
135 stars 18 forks source link

TSqlParser.Create() should be static, SqlScriptGenerator should have a similar factory method. #54

Closed poizan42 closed 11 months ago

poizan42 commented 1 year ago

TSqlParser.Create() is a factory method, but you still need to create an instance in order to use it to create an instance...

https://github.com/microsoft/SqlScriptDOM/blob/8c89e442ccde2b01398ff66f8fdfd0eaf6ae0160/SqlScriptDom/Parser/TSql/TSqlParser.cs#L36C12-L36C12

I would also like to suggest adding a similar (but static) factory method to SqlScriptGenerator, taking an SqlScriptGeneratorOptions argument.