Rene Saarsoo
Rene Saarsoo
OK. I fixed the `:` handling. If you now merge in the `master`, it should work. Though now you'll also need to add the `::` operator to the `alwaysDenseOperators` config.
Thanks for putting up with all my complaints :) I'll merge this in and create a beta release out of it.
It's now released as 11.0.0-beta.1
I'm pretty confident this setup won't work as indented. In each of these files in `export/` dir you're importing `format` from `src/sqlFormatter.ts` which depends on all the languages being loaded.
For the tree-shaking to work we need to decouple language definitions from the `format()` function. For example as I roughly outlined in #452: - We should export a base-formatter-function which...
There's currently one additional catch with making such a change. The `ExpressionFormatter.formatOperator()` contains currently a check `this.cfg.language === 'plsql'`. This won't work when language parameter is no more a string....
In general I think it's better to split this whole task into two independent parts: - providing an ESM version of sql-formatter. - decoupling individual language definitions from the core...
Sorry for not responding earlier. It seems like you're using incorrect CASE expression syntax. Although you mention "when" inside the title, you don't use that keyword in the example code....
Yep. I do understand the problem. (Thanks for also mentioning the SQL flavor you're using.) It's just that I'm not really sure what the ideal solution would be.
The formatting has now been improved in 10.8.0-beta.1