Apply format for inline SQL string
peterHakio opened this issue · comments
peterHakio commented
In our applications we write raw sql queries like:
const query = `
UPDATE "my_table"
SET "base" = tmp.new_valu....
`
We would love to be able to apply sql formating on these.
A suggestion for a way to detect such queries could be if the string starts with-- sql
. like this:
const query = `-- sql
UPDATE "my_table"
SET "base" = tmp.new_valu....
`
It could be enabled as a opt in feature, where the trigger string could be a variable the user could set in the config.
Other solution ideas would be appreciated :)
Rene Saarsoo commented