@@ -1112,19 +1112,19 @@ var FunctionQueryTests = []QueryTest{
1112
1112
{
1113
1113
Query : `SELECT JSON_ARRAY(pk, c1, c2, c3) FROM jsontable` ,
1114
1114
Expected : []sql.Row {
1115
- {types .MustJSON (`[1, "one", 1.0 , {"a": 2}]` )},
1116
- {types .MustJSON (`[2, "two", 1.5 , {"b": 2}]` )},
1117
- {types .MustJSON (`[3, "three", 2.0 , {"c": 2}]` )},
1118
- {types .MustJSON (`[4, "four", 2.5 , {"d": 2}]` )},
1115
+ {types .MustJSON (`[1, "row one", [1, 2] , {"a": 2}]` )},
1116
+ {types .MustJSON (`[2, "row two", [3, 4] , {"b": 2}]` )},
1117
+ {types .MustJSON (`[3, "row three", [5, 6] , {"c": 2}]` )},
1118
+ {types .MustJSON (`[4, "row four", [7, 8] , {"d": 2}]` )},
1119
1119
},
1120
1120
},
1121
1121
{
1122
1122
Query : `SELECT JSON_ARRAY(JSON_OBJECT("id", pk, "name", c1), c2, c3) FROM jsontable` ,
1123
1123
Expected : []sql.Row {
1124
- {types .MustJSON (`[{"id": 1, "name": "one"}, 1.0 , {"a": 2}]` )},
1125
- {types .MustJSON (`[{"id": 2, "name": "two"}, 1.5 , {"b": 2}]` )},
1126
- {types .MustJSON (`[{"id": 3, "name": "three"}, 2.0 , {"c": 2}]` )},
1127
- {types .MustJSON (`[{"id": 4, "name": "four"}, 2.5 , {"d": 2}]` )},
1124
+ {types .MustJSON (`[{"id": 1,"name": "row one"}, [1, 2] , {"a": 2}]` )},
1125
+ {types .MustJSON (`[{"id": 2,"name": "row two"}, [3, 4] , {"b": 2}]` )},
1126
+ {types .MustJSON (`[{"id": 3,"name": "row three"}, [5, 6] , {"c": 2}]` )},
1127
+ {types .MustJSON (`[{"id": 4,"name": "row four"}, [7, 8] , {"d": 2}]` )},
1128
1128
},
1129
1129
},
1130
1130
{
@@ -1240,10 +1240,6 @@ var FunctionQueryTests = []QueryTest{
1240
1240
Query : `SELECT JSON_UNQUOTE('"\\t\\u0032"')` ,
1241
1241
Expected : []sql.Row {{"\t 2" }},
1242
1242
},
1243
- {
1244
- Query : `SELECT JSON_UNQUOTE('"\t\\u0032"')` ,
1245
- Expected : []sql.Row {{"\t \\ u0032" }},
1246
- },
1247
1243
{
1248
1244
Query : `SELECT JSON_UNQUOTE(JSON_EXTRACT('{"xid":"hello"}', '$.xid')) = "hello"` ,
1249
1245
Expected : []sql.Row {{true }},
0 commit comments