summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.h
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2019-05-17 11:53:58 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2019-05-17 11:53:58 +0400
commitcd16d6d518761d144844f9f6294744f2aa42c715 (patch)
tree2908fd297353eb7d96b5b095e5408c5ae3a05d23 /sql/item_jsonfunc.h
parentda6e55f022ffc85889f5d8d62cb1c3d4fe94a195 (diff)
downloadmariadb-git-cd16d6d518761d144844f9f6294744f2aa42c715.tar.gz
MDEV-13992 Implement JSON_MERGE_PATCH.
JSON_MERGE_PATCH implemented. Added JSON_MERGE_PRESERVE as a synonim for the JSON_MERGE.
Diffstat (limited to 'sql/item_jsonfunc.h')
-rw-r--r--sql/item_jsonfunc.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h
index f2358168080..d7f804a1b60 100644
--- a/sql/item_jsonfunc.h
+++ b/sql/item_jsonfunc.h
@@ -291,12 +291,24 @@ public:
Item_func_json_array(thd, list) {}
String *val_str(String *);
bool is_json_type() { return true; }
- const char *func_name() const { return "json_merge"; }
+ const char *func_name() const { return "json_merge_preserve"; }
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
{ return get_item_copy<Item_func_json_merge>(thd, mem_root, this); }
};
+class Item_func_json_merge_patch: public Item_func_json_merge
+{
+public:
+ Item_func_json_merge_patch(THD *thd, List<Item> &list):
+ Item_func_json_merge(thd, list) {}
+ const char *func_name() const { return "json_merge_patch"; }
+ String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_json_merge_patch>(thd, mem_root, this); }
+};
+
+
class Item_func_json_length: public Item_int_func
{
protected: