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

feat: support JSON_VALUE(j, '$.a' RETURNING CHAR(50)) #414

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

cyjake
Copy link
Owner

@cyjake cyjake commented Dec 7, 2023

It looks like the performance of querying properties in native JSON data type in MySQL can be boosted with specific index, as long as the index is created with JSON_VALUE(field, path RETURNING type) that casts the property value to certain type.

To enable this optimization, the expression parser and formatter in Leoric needs to be updated, hence proposed this pr.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (55539b6) 96.66% compared to head (e162157) 96.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #414      +/-   ##
==========================================
+ Coverage   96.66%   96.70%   +0.03%     
==========================================
  Files          45       45              
  Lines        3627     3668      +41     
  Branches       72       72              
==========================================
+ Hits         3506     3547      +41     
  Misses        106      106              
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@JimmyDaddy JimmyDaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JimmyDaddy JimmyDaddy merged commit 6fd18de into master Dec 7, 2023
5 checks passed
@JimmyDaddy JimmyDaddy deleted the feat-json-value branch December 7, 2023 11:03
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.

2 participants