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

parse error in FOR JSON PATH #127

Closed
lovasoa opened this issue Nov 8, 2023 Discussed in #126 · 8 comments
Closed

parse error in FOR JSON PATH #127

lovasoa opened this issue Nov 8, 2023 Discussed in #126 · 8 comments

Comments

@lovasoa
Copy link
Collaborator

lovasoa commented Nov 8, 2023

Discussed in #126

Originally posted by Pieter3033 November 8, 2023
Hi,

The newest form component is really cool 🔥.

I am currently struggling to populate the options of a select type in the form component.
I am using MSSQL.

I have attempted the following:
(SELECT Column1 AS label, Column2 AS value FROM MyTable FOR JSON PATH) AS options

Error:
image

Note, I have tested this SQL statement inside of MSSQL and the output is as expected.
Maybe I am struggling with the syntax?

Regards

@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 8, 2023

I reported the issue upstream to the sql parser library.

In the meantime, you have two options:

@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 8, 2023

I wrote a fix for the parser, waiting for it to get merged: apache/datafusion-sqlparser-rs#1043

@Pieter3033
Copy link
Contributor

Hi @lovasoa, hope you are well.

Love the new update 🔥

I see that the sqlparser has been merged, has it been pushed in SQLPage 0.16.0 ?

@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 21, 2023

Hi ! I'm fine, thank you :)

My pull request has been merged, but the new sqlparser still hasn't been released. I'll publish a SQLPage release after the sqlparser release, which @alamb should do beginning of next week.

@Pieter3033
Copy link
Contributor

Perfect.

Thank you for the feedback.

@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 28, 2023

Good news for you !
Just merged the upstream change, we have FOR JSON in the latest development version of SQLPage.

You can try it now on docker with lovasoa/sqlpage:main, or wait for the big release which is coming in a few days max.

@Pieter3033
Copy link
Contributor

Perfect thank you for the update, looking forward to the next SQLPage update.

@lovasoa
Copy link
Collaborator Author

lovasoa commented Nov 28, 2023

It's going to be a big one, with some long awaited features :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants