sql-formatter icon indicating copy to clipboard operation
sql-formatter copied to clipboard

Feature Request: Support for sqlc

Open lil5 opened this issue 4 months ago • 1 comments

Describe the Feature SQLc uses custom non-standard sql that is converted to sql after embedding into a .go file.

Sql-formatter formats these macros incorrectly.

https://docs.sqlc.dev/en/latest/reference/macros.html

Why do you want this feature? sqlc attempts to use plain sql files to generate type checked embedded sql queries for mysql, postgres & sqlite. I've found sql-formatter pretty handy except for this one issue.

lil5 avatar Oct 21 '25 12:10 lil5

See this issue for a workaround: https://github.com/sql-formatter-org/sql-formatter/issues/861

nene avatar Oct 21 '25 14:10 nene