MariaDB [test]> select JSON_ARRAY_APPEND('{"a": []}', '$.a', JSON_QUERY('{"date":"2018-09-03","text":"mmmmmmm"}', '$')) ;
|
+--------------------------------------------------------------------------------------------------+
|
| JSON_ARRAY_APPEND('{"a": []}', '$.a', JSON_QUERY('{"date":"2018-09-03","text":"mmmmmmm"}', '$')) |
|
+--------------------------------------------------------------------------------------------------+
|
| NULL |
|
+--------------------------------------------------------------------------------------------------+
|
1 row in set, 1 warning (0.000 sec)
|
|
Warning (Code 4038): Syntax error in JSON text in argument 1 to function 'json_array_append' at position 8
|
MariaDB [test]> select JSON_ARRAY_APPEND('{"a": [{}]}', '$.a', JSON_QUERY('{"date":"2018-09-03","text":"mmmmmmm"}', '$')) ;
|
+----------------------------------------------------------------------------------------------------+
|
| JSON_ARRAY_APPEND('{"a": [{}]}', '$.a', JSON_QUERY('{"date":"2018-09-03","text":"mmmmmmm"}', '$')) |
|
+----------------------------------------------------------------------------------------------------+
|
| {"a": [{}, {"date": "2018-09-03", "text": "mmmmmmm"}]} |
|
+----------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|