aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-30 23:49:43 +0000
committerstephan <stephan@noemail.net>2022-09-30 23:49:43 +0000
commit8c1a4b89af13be96c7416f9d2357b1b188580e82 (patch)
treea4100c39f86fd857f790a75a2a339b51e6251be2 /ext/wasm/api/sqlite3-api-worker1.js
parentae589b69db0ac266f09b9e60be2eaee5e3c8e601 (diff)
downloadsqlite-8c1a4b89af13be96c7416f9d2357b1b188580e82.tar.gz
sqlite-8c1a4b89af13be96c7416f9d2357b1b188580e82.zip
Remove a couple of weird quirks of the Worker1 and Promiser APIs. The Worker1 (now undocumented) unlink capability needs to be reevaluated to work equivalently for all storage backends.
FossilOrigin-Name: 9f2b331a32cbaadfd20d04c9908171355322c1aa1d9d6df3628f3b2fb4391ec1
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-worker1.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js
index c3b1fb59d..69bb8ced6 100644
--- a/ext/wasm/api/sqlite3-api-worker1.js
+++ b/ext/wasm/api/sqlite3-api-worker1.js
@@ -225,13 +225,7 @@
type: "close",
messageId: ...as above...
dbId: ...as above...
- args: OPTIONAL: {
-
- unlink: if truthy, the associated db will be unlinked (removed)
- from the virtual filesystems. Failure to unlink is silently
- ignored. Does not currently work for all storage backends.
-
- }
+ args: none
}
```
@@ -460,6 +454,8 @@ sqlite3.initWorker1API = function(){
filename: db && db.filename
};
if(db){
+ // Keep the "unlink" flag undocumented until we figure out how
+ // to apply it consistently, independent of the db storage.
wState.close(db, ((ev.args && 'object'===typeof ev.args)
? !!ev.args.unlink : false));
}