aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/testing2.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-08-24 18:39:46 +0000
committerstephan <stephan@noemail.net>2022-08-24 18:39:46 +0000
commit3734401a95dc92f7cb7c3a86875370f1598213aa (patch)
tree19f2fb6f3a4aded3bf4a161139be448b02250cfa /ext/wasm/testing2.js
parent9c765e7945bfe79ac724e8eaf9103914f0557271 (diff)
downloadsqlite-3734401a95dc92f7cb7c3a86875370f1598213aa.tar.gz
sqlite-3734401a95dc92f7cb7c3a86875370f1598213aa.zip
Expand the worker1 'exec' op handling for per-row callbacks for API-level consistency and smooth some edges between worker1 core and worker1-promiser. Add worker1 'config-get' message to fetch the serializable parts of the sqlite3.config state. Improve the 'open' op's handling of the 'persistent' option (noting that we cannot yet test that case from a worker).
FossilOrigin-Name: 509f8839201ec1ea4863bd31493e6c29a0721ca6340755bb96656b828758fea7
Diffstat (limited to 'ext/wasm/testing2.js')
-rw-r--r--ext/wasm/testing2.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/wasm/testing2.js b/ext/wasm/testing2.js
index b051cc04c..d64fd6e89 100644
--- a/ext/wasm/testing2.js
+++ b/ext/wasm/testing2.js
@@ -115,9 +115,15 @@
},
resultRowTest1: function f(ev){
if(undefined === f.counter) f.counter = 0;
- if(ev.row) ++f.counter;
- //log("exec() result row:",ev.row);
- T.assert(null===ev.row || 'number' === typeof ev.row.b);
+ if(null === ev.rowNumber){
+ /* End of result set. */
+ T.assert(undefined === ev.row);
+ }else{
+ T.assert(ev.rowNumber > 0);
+ ++f.counter;
+ }
+ //log("exec() result row:",ev);
+ T.assert(null === ev.rowNumber || 'number' === typeof ev.row.b);
}
};