Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add extra tests to this branch. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | writable-vtab-without-rowid |
Files: | files | file ages | folders |
SHA3-256: |
b0e3b88a792623f7761586d8bfac058d |
User & Date: | dan 2017-08-10 19:10:23.968 |
Context
2017-08-10
| ||
19:12 | Fix a typo in csv01.test introduced by the previous commit. (Closed-Leaf check-in: f38ff71827 user: dan tags: writable-vtab-without-rowid) | |
19:10 | Add extra tests to this branch. (check-in: b0e3b88a79 user: dan tags: writable-vtab-without-rowid) | |
17:53 | Test case for writing to a WITHOUT ROWID virtual table. The TCLVAR virtual table is modified to add a "fullname" column which is the primary key, and to accept update operations against the primary key. (check-in: 6997e00c32 user: drh tags: writable-vtab-without-rowid) | |
Changes
Changes to test/csv01.test.
︙ | ︙ | |||
120 121 122 123 124 125 126 127 128 | 13,14,15,16', columns=4, schema= 'CREATE TABLE t3(a,b,c,d,PRIMARY KEY(b)) WITHOUT ROWID', testflags=1 ); } {0 {}} finish_test | > > > > > > > > > > > > > > > > | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | 13,14,15,16', columns=4, schema= 'CREATE TABLE t3(a,b,c,d,PRIMARY KEY(b)) WITHOUT ROWID', testflags=1 ); } {0 {}} do_catchsql_test 4.2 { DROP TABLE IF EXISTS t5; CREATE VIRTUAL TABLE temp.t5 USING csv_wr( data= '1,2,3,4 5,6,7,8 9,10,11,12 13,14,15,16', columns=4, schema= 'CREATE TABLE t3(a,b,c,d) WITHOUT ROWID', testflags=1 ); } {0 {vtable constructor failed: t5}} finish_test |
Changes to test/vtabJ.test.
︙ | ︙ | |||
94 95 96 97 98 99 100 101 102 | do_test 162 { set res {} foreach vname [lsort [array names vtabJ]] { lappend res vtabJ($vname) $vtabJ($vname) } set res } {vtabJ(1) this vtabJ(3) {a test} vtabJ(5) 55} finish_test | > > > > > > > > > > > > > > > > > > > > > > > > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | do_test 162 { set res {} foreach vname [lsort [array names vtabJ]] { lappend res vtabJ($vname) $vtabJ($vname) } set res } {vtabJ(1) this vtabJ(3) {a test} vtabJ(5) 55} # Try to trick the module into updating the same variable twice for a # single UPDATE statement. # do_execsql_test 171 { INSERT INTO tclvar(fullname, value) VALUES('xx', 'a'); SELECT name, value FROM tclvar where name = 'xx'; } {xx a} do_execsql_test 172 { UPDATE tclvar SET value = value || 't' WHERE name = 'xx' OR name = 'x'||'x'; SELECT name, value FROM tclvar where name = 'xx'; } {xx at} do_execsql_test 173 { UPDATE tclvar SET value = value || 't' WHERE name = 'xx' OR name BETWEEN 'xx' AND 'xx'; SELECT name, value FROM tclvar where name = 'xx'; } {xx att} do_execsql_test 181 { DELETE FROM tclvar WHERE name BETWEEN 'xx' AND 'xx' OR name='xx'; SELECT name, value FROM tclvar where name = 'xx'; } {} finish_test |