Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db2i formatting does not work with JSON* functions #773

Open
cmh716 opened this issue Aug 30, 2024 · 1 comment
Open

db2i formatting does not work with JSON* functions #773

cmh716 opened this issue Aug 30, 2024 · 1 comment

Comments

@cmh716
Copy link

cmh716 commented Aug 30, 2024

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.

@cmh716 cmh716 added the bug label Aug 30, 2024
@nene
Copy link
Collaborator

nene commented Sep 1, 2024

Thanks for reporting.

I can confirm that the issue does reproduce, giving an error:

Parse error: Unexpected ":'val') FR" at line 1 column 25. SQL dialect used: "db2i".

@nene nene added the db2 label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants