diff options
author | stephan <stephan@noemail.net> | 2022-08-25 13:27:52 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-08-25 13:27:52 +0000 |
commit | 335ad5264f497a680a5529884de419b54809089f (patch) | |
tree | 655f3c7b86a2f83734c77cbd8bf2f6e402033bb6 /ext/wasm/testing2.js | |
parent | 9afff9f3c539516c29ce0752b5b84adf8f6ebc19 (diff) | |
download | sqlite-335ad5264f497a680a5529884de419b54809089f.tar.gz sqlite-335ad5264f497a680a5529884de419b54809089f.zip |
Consolidate oo1.DB.exec() and oo1.DB.execMulti() into oo1.DB.exec(). This is a bit less efficient but certainly easier for a client to deal with and lightens the maintenance burden.
FossilOrigin-Name: 7eff7213dff553b76d7ce45063e3c4a19544716611a0b609593d704076b38d0b
Diffstat (limited to 'ext/wasm/testing2.js')
-rw-r--r-- | ext/wasm/testing2.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/wasm/testing2.js b/ext/wasm/testing2.js index 8d9e66dc1..0a31c470a 100644 --- a/ext/wasm/testing2.js +++ b/ext/wasm/testing2.js @@ -70,7 +70,7 @@ (ev.workerRespondTime - ev.workerReceivedTime),"ms.", "Round-trip event time =", (performance.now() - ev.departureTime),"ms.", - (evd.errorClass ? ev.message : ""), evd + (evd.errorClass ? ev.message : "")//, JSON.stringify(evd) ); }; @@ -149,10 +149,9 @@ throw new Error("This is not supposed to be reached."); }; runOneTest('exec',{ - sql: ["create table t(a,b)", + sql: ["create table t(a,b);", "insert into t(a,b) values(1,2),(3,4),(5,6)" - ].join(';'), - multi: true, + ], resultRows: [], columnNames: [] }, function(ev){ ev = ev.result; @@ -161,7 +160,7 @@ }); runOneTest('exec',{ sql: 'select a a, b b from t order by a', - resultRows: [], columnNames: [], + resultRows: [], columnNames: [], saveSql:[] }, function(ev){ ev = ev.result; T.assert(3===ev.resultRows.length) @@ -170,6 +169,7 @@ .assert(2===ev.columnNames.length) .assert('b'===ev.columnNames[1]); }); + //if(1){ error("Returning prematurely for testing."); return; } runOneTest('exec',{ sql: 'select a a, b b from t order by a', resultRows: [], columnNames: [], @@ -200,12 +200,12 @@ dbMsgHandler.resultRowTest1.counter = 0; }); runOneTest('exec',{ - multi: true, sql:[ - 'pragma foreign_keys=0;', + "pragma foreign_keys=0;", // ^^^ arbitrary query with no result columns - 'select a, b from t order by a desc; select a from t;' - // multi-exec only honors results from the first + "select a, b from t order by a desc;", + "select a from t;" + // multi-statement exec only honors results from the first // statement with result columns (regardless of whether) // it has any rows). ], |