-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Description
From #965, broadening that issue to being able to avoid the auto-formatting. For context, this is can be important with non-standard SQL, like Snowflake's semi-structured data.
A couple of options for how we could do this:
- Implement an "ignore" option upstream, in Possible to provide an escape hatch for expressions? shssoichiro/sqlformat-rs#15. I'm not sure whether upstream would accept a PR (though it seems reasonable, and worst case we could maintain a fork)
- Replace s-strings after the auto-formatting, using
$s_string_n
. This requires passing s-strings all the way through the compiler, reducing the modularity of the compiler phases, but otherwise being fairly simple. - Relying on the new
Options
struct to disable formatting entirely. This has the disadvantage of being an all-or-nothing option, but might be an acceptable temporary solution.
mklopets, eitsupi and andresrcs