mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user