[DO NOT MERGE] demo feat: json_object support#2242
Draft
chloeminkyung wants to merge 1 commit intomainfrom
Draft
[DO NOT MERGE] demo feat: json_object support#2242chloeminkyung wants to merge 1 commit intomainfrom
chloeminkyung wants to merge 1 commit intomainfrom
Conversation
Contributor
|
The syntax is a bit unusual. Can we use the SQL/JSON standard syntax instead? select JSON_OBJECT('id': user.id, 'town': user.town, 'town_2': 'LA')and/or select JSON_OBJECT('id' VALUE user.id, 'town' VALUE user.town, 'town_2' VALUE 'LA')On advantage is that there is a clear distinction between value literals |
Contributor
Author
yes, we are aware of that - this is hacky way to implement this feature as fast as possible, request from Bei for demo purpose. Not merging for main, of course. I have implemented this way cause of our backend limitation. We should take one of your approaches when we are implementing properly later on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SELECT JSON_OBJECT('id: user.id', 'town: user.town', 'town_2: LA') as info FROM users{"id": 1, "town": "Bristol", "town_2": "LA"}