-
Notifications
You must be signed in to change notification settings - Fork 109
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
SQLPage throws on postgres json_object #708
Comments
I apologize for the constant edits to this issue. I was trying to write a reproduction that wasn't specific to my codebase, and some details got lost when I was using examples from sqlpage and the postgres docs. The comment should be good now |
Hello and thank you for the report ! We'll get this postgres-specific syntax implemented in the sql parser. In the meantime, as you already figured out, you can use |
Postgres is so notoriously difficult to parse that even pgformatter struggles to keep pace 😂 Thank you for the prompt reply. Twice in as many days! |
I opened a PR upstream; it's a small fix, the same syntax is already supported for mssql. |
Introduction
SQLPage throws on
json_object
To Reproduce
A simple form component with one input child. Its child is a select with options. The example is borrowed from the postgres docs, but the keys are changed to match SQLPage's expected types.
https://www.postgresql.org/docs/current/functions-json.html
The first SELECT returns:
The second SELECT returns:
Actual behavior
After following these steps, what happened ?
If you saw an error on the command line or inside your page, then paste it here
The json_build_object works, probably because the syntax is not postgres-specific:
Expected behavior
SQLPage is sql-engine agnostic. SQLPage supports (ignores) postgres json functions.
Version information
The text was updated successfully, but these errors were encountered: