diff options
author | stephan <stephan@noemail.net> | 2022-12-25 23:45:59 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-12-25 23:45:59 +0000 |
commit | 7103801df1049ca96d764d73bd4a42fa21b53273 (patch) | |
tree | 0cff9a1f44d7715c32fd551adaefc1c722497b63 /ext/wasm/api/sqlite3-api-worker1.js | |
parent | ec35e92d1d52cbe92a3a283b510a45c8fb03c9d1 (diff) | |
download | sqlite-7103801df1049ca96d764d73bd4a42fa21b53273.tar.gz sqlite-7103801df1049ca96d764d73bd4a42fa21b53273.zip |
Update JS worker #1 API and related tests for recent API changes.
FossilOrigin-Name: d797e183e96e04520636865204c02307b751fdc2949a04587de9259a1733e37b
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-worker1.js | 18 |
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; |