datatypes icon indicating copy to clipboard operation
datatypes copied to clipboard

support json_set/jsonreplace/jsoninsert/jsonremove feature

Open smartandcoolbear opened this issue 4 years ago • 1 comments

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

smartandcoolbear avatar Nov 08 '20 03:11 smartandcoolbear

+1

erzay avatar May 09 '22 06:05 erzay