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