aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-18 17:32:35 +0000
committerstephan <stephan@noemail.net>2022-09-18 17:32:35 +0000
commitf38601206997aa909b2cd6dba02cb0b4e13e8e2a (patch)
tree7968c95b16ea078621e051c56bfd46b7e1197ce7 /ext/wasm/api/sqlite3-api-worker1.js
parent0db3089576b6df43fa477100446ab330b5bda905 (diff)
downloadsqlite-f38601206997aa909b2cd6dba02cb0b4e13e8e2a.tar.gz
sqlite-f38601206997aa909b2cd6dba02cb0b4e13e8e2a.zip
Numerous cleanups in the JS bits. Removed some now-defunct wasm test files. Expose sqlite3.opfs object containing various OPFS-specific utilities.
FossilOrigin-Name: 26e625d05d9820033b23536f18ad3ddc59ed712ad507d4b0c7fe88abd15d2be8
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-worker1.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js
index 00359413b..97f2677e6 100644
--- a/ext/wasm/api/sqlite3-api-worker1.js
+++ b/ext/wasm/api/sqlite3-api-worker1.js
@@ -371,10 +371,14 @@ sqlite3.initWorker1API = function(){
close: function(db,alsoUnlink){
if(db){
delete this.dbs[getDbId(db)];
- const filename = db.fileName();
+ const filename = db.getFilename();
db.close();
if(db===this.defaultDb) this.defaultDb = undefined;
if(alsoUnlink && filename){
+ /* This isn't necessarily correct: the db might be using a
+ VFS other than the default. How do we best resolve this
+ without having to special-case the kvvfs and opfs
+ VFSes? */
sqlite3.capi.wasm.sqlite3_wasm_vfs_unlink(filename);
}
}