Repository navigation
Use our new JSON serialization infra for partial updates - #31232
Merged
Merged
Conversation
maumar
reviewed
Jul 12, 2023
maumar
reviewed
Jul 12, 2023
maumar
reviewed
Jul 12, 2023
maumar
approved these changes
Jul 12, 2023
ajcvickers
reviewed
Jul 13, 2023
| parameters = parameters with | ||
| { | ||
| Value = Encoding.UTF8.GetString(stream.ToArray())[1..^1] | ||
| }; |
Contributor
There was a problem hiding this comment.
I think all of this should go away once I have my changes in.
ajcvickers
approved these changes
Jul 13, 2023
In addition, when the database's partial update function (e.g. JSON_MODIFY) accepts a non-JSON relational value (e.g. int), simply send that value via the property's regular type mapping.
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.
This uses the type mapping's new JsonValueReaderRewriter for generating the JSON representation for single-property partial updates.
In addition, when the database's partial update function (e.g. JSON_MODIFY) accepts a non-JSON relational value (e.g. int), simply send that value via the property's regular type mapping. We were previously always converting values (e.g. int) to a JSON string representation, and then applying a SQL cast inside JSON_MODIFY. This has been removed, and we just send regular relational int parameters instead.
@ajcvickers you'll probably be interested in this too.