1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add sqlite3_web_vfs_list() to JS API. Corrected OPFS VFS's registering itself as the default VFS. speedtest1-worker now uses the xDelete() of both the default VFS and OPFS, to avoid that it starts up with a persistent OPFS test db (the native app calls unlink(), but that unlink call operates on a different virtual filesystem than the OPFS VFS).

FossilOrigin-Name: 2ec7e09139a510b9fd29e4c97283b20740a00f369193c6fecbb734f187e81b48
This commit is contained in:
stephan
2022-09-19 13:44:23 +00:00
parent b5ae85eca2
commit 0e0687ccfc
8 changed files with 44 additions and 25 deletions

View File

@ -813,6 +813,22 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
}
};
/**
Returns an array of the names of all currently-registered sqlite3
VFSes.
*/
capi.sqlite3_web_vfs_list = function(){
const rc = [];
let pVfs = capi.sqlite3_vfs_find(0);
while(pVfs){
const oVfs = new capi.sqlite3_vfs(pVfs);
rc.push(capi.wasm.cstringToJs(oVfs.$zName));
pVfs = oVfs.$pNext;
oVfs.dispose();
}
return rc;
};
if( self.window===self ){
/* Features specific to the main window thread... */