You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MySQL, # is the start of a single line comment.
In SQL Server, # is used to prefix temporary table names.
In Microsoft Access SQL, # is used to surround dates.
In Oracle SQL, # is a valid character in an unquoted identifier.
These are just the ones I was able to find with a few minutes of searching.
Currently, it uses the MySQL meaning and highlights/formats it as a comment.
I'm not sure what the correct thing to do is.
The text was updated successfully, but these errors were encountered:
Perhaps an optional parameter or config to specify which dialect to use. I'd prefer this as it would allow me to tell the formatter which dialect to use.
For SAP ASE # indicates a temporary table when used as a table name. Would it not be the best to remove the # from comments now?
On the other hand i also prefer @hhellbusch suggestion of giving the formater information about which dialect it should use. Would this be a satisfiable solution to you @jdorn? If so i would implement it that way.
My suggestion is to make the SqlFormater class instanceable and give a dialect as argument in the construct. Then i would create multiple dialect classes which conains the dialect tokens etc.
Then i would deprecate the use of the static format method and would instantiate a new instance there and call the new method on the object.
In MySQL,
#
is the start of a single line comment.In SQL Server,
#
is used to prefix temporary table names.In Microsoft Access SQL,
#
is used to surround dates.In Oracle SQL,
#
is a valid character in an unquoted identifier.These are just the ones I was able to find with a few minutes of searching.
Currently, it uses the MySQL meaning and highlights/formats it as a comment.
I'm not sure what the correct thing to do is.
The text was updated successfully, but these errors were encountered: