aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-01-11 22:45:20 +0000
committerstephan <stephan@noemail.net>2023-01-11 22:45:20 +0000
commita7c498599f917607542bcd7003c445723aba9127 (patch)
treee96d905dffd46e39667d019e1f2cc8a4a31358ff /ext/wasm/api/sqlite3-api-worker1.js
parent60a1a0f7df99e03bba7abc45f526e372c20d2fdc (diff)
parent8518eaccd79ae83a55fad3c3fa545beb16fb127c (diff)
downloadsqlite-a7c498599f917607542bcd7003c445723aba9127.tar.gz
sqlite-a7c498599f917607542bcd7003c445723aba9127.zip
Merge trunk into wasi-patches branch and add missing yes/no result to the configure script's output for the --with-wasi-sdk=PATH test.
FossilOrigin-Name: adc0ede0a43241b85563408d0de8e640a75ec4f7bdfe5e48acc5cdd6b182b88c
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-worker1.js18
1 files changed, 3 insertions, 15 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js
index 62e2bb9bd..250b6fcdf 100644
--- a/ext/wasm/api/sqlite3-api-worker1.js
+++ b/ext/wasm/api/sqlite3-api-worker1.js
@@ -158,15 +158,6 @@
bigIntEnabled: bool. True if BigInt support is enabled.
- wasmfsOpfsDir: path prefix, if any, _intended_ for use with
- WASMFS OPFS persistent storage.
-
- wasmfsOpfsEnabled: true if persistent storage is enabled in the
- current environment. Only files stored under wasmfsOpfsDir
- will persist using that mechanism, however. It is legal to use
- the non-WASMFS OPFS VFS to open a database via a URI-style
- db filename.
-
vfsList: result of sqlite3.capi.sqlite3_js_vfs_list()
}
}
@@ -449,7 +440,6 @@ sqlite3.initWorker1API = function(){
toss("Throwing because of simulateError flag.");
}
const rc = Object.create(null);
- const pDir = sqlite3.capi.sqlite3_wasmfs_opfs_dir();
let byteArray, pVfs;
oargs.vfs = args.vfs;
if(isSpecialDbFilename(args.filename)){
@@ -475,15 +465,14 @@ sqlite3.initWorker1API = function(){
e.name+' creating '+args.filename+": "+e.message, {
cause: e
}
- );
+ );
}finally{
if(pMem) sqlite3.wasm.dealloc(pMem);
}
}
const db = wState.open(oargs);
rc.filename = db.filename;
- rc.persistent = (!!pDir && db.filename.startsWith(pDir+'/'))
- || !!sqlite3.capi.sqlite3_js_db_uses_vfs(db.pointer, "opfs");
+ rc.persistent = !!sqlite3.capi.sqlite3_js_db_uses_vfs(db.pointer, "opfs");
rc.dbId = getDbId(db);
rc.vfs = db.dbVfsName();
return rc;
@@ -558,11 +547,10 @@ sqlite3.initWorker1API = function(){
'config-get': function(){
const rc = Object.create(null), src = sqlite3.config;
[
- 'wasmfsOpfsDir', 'bigIntEnabled'
+ 'bigIntEnabled'
].forEach(function(k){
if(Object.getOwnPropertyDescriptor(src, k)) rc[k] = src[k];
});
- rc.wasmfsOpfsEnabled = !!sqlite3.capi.sqlite3_wasmfs_opfs_dir();
rc.version = sqlite3.version;
rc.vfsList = sqlite3.capi.sqlite3_js_vfs_list();
rc.opfsEnabled = !!sqlite3.opfs;