Skip to content

JSON: optimize update path for single property element - don't wrap the value in json array #30410

Closed
@maumar

Description

@maumar

Currently when updating single property inside json, we create parameter value as JSON array and put the value in it, then extract it in the update statement. This is because we want to guarantee the correct format of the value that we want to update (if we rely on database casting from a given type to string, we may end up in bad format and data gets corrupted. This only happens for some data types on sql server (guid, datetime, datetime offset) - so maybe we can special case. But need to look at Sqlite. Alternatively, if/when we have dedicated type mapping for json, we might be able to always generate parameter string value in correct format to be stored inside JSON.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions