aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-12-24 01:59:42 +0000
committerstephan <stephan@noemail.net>2022-12-24 01:59:42 +0000
commit0cdc01d01a288a83327aaa3ed9d29966ffe7b81f (patch)
tree5ab00188e74115eec8792769457799de34148d55 /ext/wasm/tester1.c-pp.js
parent027afccdcd6e9077b7043545a3f8bd32cfb5a397 (diff)
downloadsqlite-0cdc01d01a288a83327aaa3ed9d29966ffe7b81f.tar.gz
sqlite-0cdc01d01a288a83327aaa3ed9d29966ffe7b81f.zip
If sqlite3.oo1.DB.exec()'s callback returns a literal false, stop step()ing over results as if the end of the result set had been reached. Unrelated minor code-adjacent cleanups.
FossilOrigin-Name: 33a58c8ece3b37a8edc3434af36643e2d489a53a672d778c5b77e66666045c30
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r--ext/wasm/tester1.c-pp.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js
index 5411c064c..82dd73e23 100644
--- a/ext/wasm/tester1.c-pp.js
+++ b/ext/wasm/tester1.c-pp.js
@@ -1391,6 +1391,14 @@ self.sqlite3InitModule = sqlite3InitModule;
db.selectValue("SELECT "+Number.MIN_SAFE_INTEGER)).
assert(Number.MAX_SAFE_INTEGER ===
db.selectValue("SELECT "+Number.MAX_SAFE_INTEGER));
+
+ counter = 0;
+ db.exec({
+ sql: "SELECT a FROM t",
+ callback: ()=>(1===++counter),
+ });
+ T.assert(2===counter,
+ "Expecting exec step() loop to stop if callback returns false.");
if(wasm.bigIntEnabled && haveWasmCTests()){
const mI = wasm.xCall('sqlite3_wasm_test_int64_max');
const b = BigInt(Number.MAX_SAFE_INTEGER * 2);