/ Check-in [807975c7]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the windowB test module so that it works even if SQLite is built without JSON support.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 807975c76b36347f02aa0ce9661d608adbffe1f7e77c15f8da677e47e1187153
User & Date: drh 2019-09-13 18:59:04
Context
2019-09-13
20:42
Fix a problem with using json1 window functions with an EXCLUDE clause. check-in: 4a197881 user: dan tags: trunk
18:59
Fix the windowB test module so that it works even if SQLite is built without JSON support. check-in: 807975c7 user: drh tags: trunk
18:27
Add the SQLITE_SUBTYPE flag, which may be passed to sqlite3_create_window_function() to indicate that the window function uses sqlite3_value_subtype() to check the sub-type of its arguments. check-in: ba2ebc3a user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/windowB.test.

83
84
85
86
87
88
89

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
reset_db
do_execsql_test 3.0 {
  CREATE TABLE testjson(id INTEGER PRIMARY KEY, j TEXT);
  INSERT INTO testjson VALUES(1, '{"a":1}');
  INSERT INTO testjson VALUES(2, '{"b":2}');
}


do_execsql_test 3.1 {
  SELECT json_group_array(json(j)) FROM testjson;
} {
  {[{"a":1},{"b":2}]}
}

breakpoint
do_execsql_test 3.2 {
  SELECT json_group_array(json(j)) OVER (ORDER BY id) FROM testjson;
} {
  {[{"a":1}]}
  {[{"a":1},{"b":2}]}
}


finish_test








>
|
|
|
|
|

<
|
|
|
|
|
|
|


<
83
84
85
86
87
88
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105

reset_db
do_execsql_test 3.0 {
  CREATE TABLE testjson(id INTEGER PRIMARY KEY, j TEXT);
  INSERT INTO testjson VALUES(1, '{"a":1}');
  INSERT INTO testjson VALUES(2, '{"b":2}');
}

ifcapable json1 {
  do_execsql_test 3.1 {
    SELECT json_group_array(json(j)) FROM testjson;
  } {
    {[{"a":1},{"b":2}]}
  }


  do_execsql_test 3.2 {
    SELECT json_group_array(json(j)) OVER (ORDER BY id) FROM testjson;
  } {
    {[{"a":1}]}
    {[{"a":1},{"b":2}]}
  }
}

finish_test