Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: third_party/sqlite/src/test/json103.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/json101.test ('k') | third_party/sqlite/src/test/kvtest.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2015-12-30 1 # 2015-12-30
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 do_execsql_test json103-210 { 54 do_execsql_test json103-210 {
55 SELECT json_group_object(c,a) FROM t1 55 SELECT json_group_object(c,a) FROM t1
56 WHERE rowid BETWEEN 31 AND 39 AND rowid%2==1; 56 WHERE rowid BETWEEN 31 AND 39 AND rowid%2==1;
57 } {{{"n31":32.5,"n33":33,"n35":35,"n37":null,"n39":"orange"}}} 57 } {{{"n31":32.5,"n33":33,"n35":35,"n37":null,"n39":"orange"}}}
58 do_execsql_test json103-220 { 58 do_execsql_test json103-220 {
59 SELECT b, json_group_object(c,a) FROM t1 59 SELECT b, json_group_object(c,a) FROM t1
60 WHERE rowid<7 GROUP BY b ORDER BY b; 60 WHERE rowid<7 GROUP BY b ORDER BY b;
61 } {0 {{"n3":3,"n6":6}} 1 {{"n1":1,"n4":4}} 2 {{"n2":2,"n5":5}}} 61 } {0 {{"n3":3,"n6":6}} 1 {{"n1":1,"n4":4}} 2 {{"n2":2,"n5":5}}}
62 62
63 63 # ticket https://www.sqlite.org/src/info/f45ac567eaa9f93c 2016-01-30
64 # Invalid JSON generated by json_group_array()
65 #
66 # The underlying problem is a failure to reset Mem.eSubtype
67 #
68 do_execsql_test json103-300 {
69 DROP TABLE IF EXISTS t1;
70 CREATE TABLE t1(x);
71 INSERT INTO t1 VALUES(1),('abc');
72 SELECT
73 json_group_array(x),
74 json_group_array(json_object('x',x))
75 FROM t1;
76 } {{[1,"abc"]} {[{"x":1},{"x":"abc"}]}}
64 77
65 finish_test 78 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/json101.test ('k') | third_party/sqlite/src/test/kvtest.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698