1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.

FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
This commit is contained in:
stephan
2022-09-27 13:40:12 +00:00
parent 3d64548491
commit 5b9973d898
16 changed files with 140 additions and 76 deletions

View File

@ -77,8 +77,8 @@
const r = ev.result;
log('sqlite3.config subset:', r);
T.assert('boolean' === typeof r.bigIntEnabled)
.assert('string'===typeof r.persistentDirName)
.assert('boolean' === typeof r.persistenceEnabled);
.assert('string'===typeof r.wasmfsOpfsDir)
.assert('boolean' === typeof r.wasmfsOpfsEnabled);
sqConfig = r;
});
logHtml('',
@ -86,12 +86,12 @@
await wtest('open', {
filename: dbFilename,
persistent: sqConfig.persistenceEnabled,
persistent: sqConfig.wasmfsOpfsEnabled,
simulateError: 0 /* if true, fail the 'open' */,
}, function(ev){
const r = ev.result;
log("then open result",r);
T.assert(r.persistent === sqConfig.persistenceEnabled)
T.assert(r.persistent === sqConfig.wasmfsOpfsEnabled)
.assert(r.persistent
? (dbFilename!==r.filename)
: (dbFilename==r.filename))