This commit is contained in:
KevinyhZou 2023-03-15 11:28:02 +08:00
parent 0935ccf0e0
commit 3adc42af5c

View File

@ -17,7 +17,7 @@ SELECT JSON_VALUE('{"hello":["world","world2"]}', '$.hello');
["world","world2"]
SELECT JSON_VALUE('{"hello":{"world":"!"}}', '$.hello');
{"world":"!"}
SELECT JSON_VALUE('{hello:world}', '$.hello');
SELECT JSON_VALUE('{hello:world}', '$.hello'); -- invalid json => default value (empty string)
SELECT JSON_VALUE('', '$.hello');
@ -32,7 +32,7 @@ select JSON_VALUE('{"a":"\\n\\u0000"}', '$.a');
select JSON_VALUE('{"a":"\\u263a"}', '$.a');
select JSON_VALUE('{"a":"b"}', '$.b') settings function_return_type_allow_nullable=true;
null
\N
SELECT '--JSON_QUERY--';
--JSON_QUERY--
SELECT JSON_QUERY('{"hello":1}', '$');