sql-formatter
sql-formatter copied to clipboard
db2i formatting does not work with JSON* functions
Describe the bug JSON_OBJECT, JSON_ARRAY, JSON_ARRAGG, etc do not work with this plugin
Expected behavior I expect these statements to be formatted
Actual behavior The plugin returns a parse error
Usage You can reproduce the issue on IBMi systems db2i:
SELECT JSON_OBJECT('key':'val') FROM SYSIBM.SYSDUMMY1;
To return complex JSON objects from DB2i, it's not uncommon to have a lot of JSON_OBJECTS and ARRAY, ARRAYAGG nested.