go-gorm / go-gorm/datatypes

support json_set/jsonreplace/jsoninsert/jsonremove feature

Open
#20 1 comment 0 reactions 1 assignee Claimed by @jinzhu View on GitHub
Dominant language
Go
Stars
831
Forks
124
PR merge metrics
No merged PRs in 30d

Description

## Describe the feature
It would be nice to have an ability to change some port of the json, just like the original features "json_set/jsonreplace/jsoninsert/jsonremove" do in mysql.

Something like

datatypes.JSONSet("json_column").Path("$.labels.my_label", "$.labels.my_label1").Value("my_value", "my_value1")

Which would be SQL in MySQL

UPDATE mytable SET json_column = json_set(json_column, '$.labels.my_label', 'my_value', '$.labels.my_label1','my_value1');

## Motivation

## Related Issues

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.