sql-formatter
sql-formatter copied to clipboard
missing -- sql comment support for disable formatting
https://github.com/sql-formatter-org/sql-formatter/blob/976f97df76b0d44a77fb37b703d85be889457da8/src/lexer/Tokenizer.ts#L37
In MariaDB you can't use /* comment */ and need to use -- comment to disable formatting in mariadb sql files for queries, it would be handy to be able to use -- instead like so:
SELECT
-- sql-formatter-disable
sqlc.embed(users),
-- sql-formatter-enable
customers.id
FROM
customers
JOIN users ON users.customer_id = customers.id
My personal issue is the issue that this formatter adds a space after embed for my golang sqlc project (see #913)
--- sqlc.embed(users)
+++ sqlc.embed (users)
Well, according to the documentation (and my testing) MariaDB supports /* */ comments just fine.
https://mariadb.com/docs/server/reference/sql-statements/comment-syntax