sqlc
sqlc copied to clipboard
Make `sqlc.embed` compatible with `pgFormatter` and `sql-formatter`
What does this PR fixed?
- This PR addresses issues with SQL formatting tools pgFormatter and sql-formatter. These tools are used to format SQL, similar to how
go fmtformats Go code. - Both formatters, by default, add spaces before function calls. This changes
sqlc.embed(name)tosqlc.embed (name), whichsqlccannot parse correctly:
$ cd example/batch
$ sqlc generate
> # package batch
> postgresql/query.sql:10:1: edited query syntax is invalid: syntax error at or near ")"