-
Notifications
You must be signed in to change notification settings - Fork 247
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
qe: Fix nested objects with $type
key in JSON protocol
#4670
Merged
Conversation
This file contains 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
SevInf
force-pushed
the
fix/nested-json-dollar-type-2
branch
from
January 24, 2024 13:32
454abb7
to
e840c5a
Compare
SevInf
changed the title
qe: Fix nested objects with
qe: Fix nested objects with Jan 24, 2024
$type
key in JSON protocol$type
key in JSON protocol (alternative idea)
WASM Size
|
CodSpeed Performance ReportMerging #4670 will not alter performanceComparing Summary
|
❌ WASM query-engine performance will worsen by 1.78%Full benchmark report
After changes in 384423d |
SevInf
force-pushed
the
fix/nested-json-dollar-type-2
branch
2 times, most recently
from
January 26, 2024 10:56
9139b66
to
941744b
Compare
Original idea does not work for edge case with JSON lists, going back to this now. |
Introduce another special value to JSON protocol, `"$type": "Raw"`. When encountered, no other nested `$type` keys would be interpreted as special and will be written to DB as is. Main usecase is JSON column values with user-provided `$type` keys. This is an alternative to #4668, that might look cleaner on the engine side. Part of the fix for prisma/prisma#21454, will require client adjustments as well.
SevInf
force-pushed
the
fix/nested-json-dollar-type-2
branch
from
January 29, 2024 09:35
941744b
to
384423d
Compare
SevInf
pushed a commit
to prisma/prisma
that referenced
this pull request
Jan 29, 2024
Works on top of prisma/prisma-engines#4670. Adds `$type: Raw` special case to JSON protocol and replaces `$type: Json` encoding with it. See engine PR for detailed description of the problem. Fix #21454
SevInf
changed the title
qe: Fix nested objects with
qe: Fix nested objects with Jan 29, 2024
$type
key in JSON protocol (alternative idea)$type
key in JSON protocol
Jolg42
approved these changes
Jan 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
SevInf
pushed a commit
to prisma/prisma
that referenced
this pull request
Jan 29, 2024
Works on top of prisma/prisma-engines#4670. Adds `$type: Raw` special case to JSON protocol and replaces `$type: Json` encoding with it. See engine PR for detailed description of the problem. Fix #21454
SevInf
pushed a commit
to prisma/prisma
that referenced
this pull request
Jan 29, 2024
Works on top of prisma/prisma-engines#4670. Adds `$type: Raw` special case to JSON protocol and replaces `$type: Json` encoding with it. See engine PR for detailed description of the problem. Fix #21454
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.
Introduce another special value to JSON protocol,
"$type": "Raw"
.When encountered, no other nested
$type
keys would be interpreted asspecial and will be written to DB as is. Main usecase is JSON column
values with user-provided
$type
keys.This is an alternative to #4668 that keeps JSON lists behaviour unchanged.
Part of the fix for prisma/prisma#21454, will require client adjustments
as well.