MCPcopy Create free account
hub / github.com/MariaDB/server / add

Method add

sql/item_jsonfunc.cc:4865–4886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4863
4864
4865bool Item_func_json_objectagg::add()
4866{
4867 StringBuffer<MAX_FIELD_WIDTH> buf;
4868 String *key;
4869
4870 key= args[0]->val_str(&buf);
4871 if (args[0]->is_null())
4872 return 0;
4873
4874 null_value= 0;
4875 if (result.length() > 1)
4876 result.append(STRING_WITH_LEN(", "));
4877
4878 result.append('"');
4879 st_append_escaped(&result,key);
4880 result.append(STRING_WITH_LEN("\":"));
4881
4882 buf.length(0);
4883 append_json_value(&result, args[1], &buf);
4884
4885 return 0;
4886}
4887
4888
4889String* Item_func_json_objectagg::val_str(String* str)

Callers

nothing calls this directly

Calls 6

st_append_escapedFunction · 0.85
append_json_valueFunction · 0.85
val_strMethod · 0.45
is_nullMethod · 0.45
lengthMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected