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

Add partial implementation of JSON simplified accessor #3820

Merged
merged 3 commits into from Jun 12, 2023

Conversation

katzyn
Copy link
Contributor

@katzyn katzyn commented Jun 12, 2023

The SQL Standard now allows access to elements of composite JSON with the same syntax as array element reference and field reference have. A partial implementation is added here.

Parser doesn't require parentheses around left side of field reference (for both ROW and JSON values) any more, but if left side is a qualified or unqualified identifier they still need to be used, because otherwise COLUMN.FIELD will be parsed as column FIELD in table alias COLUMN, our parser isn't that smart to distinguish these cases.

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jun 12, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/h2database/h2database/3820.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/h2database/h2database/3820.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@katzyn katzyn merged commit f8ba02e into h2database:master Jun 12, 2023
4 checks passed
@katzyn katzyn deleted the json branch June 12, 2023 11:51
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

Successfully merging this pull request may close these issues.

None yet

1 participant