aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-27 13:40:12 +0000
committerstephan <stephan@noemail.net>2022-09-27 13:40:12 +0000
commit5b9973d89849c318b0500de1fa0019181e7bd3c0 (patch)
treef6f34298ed88a7fd6a8c6d80f49c4aaae29b73ee /ext/wasm/api/sqlite3-api-worker1.js
parent3d64548491f6e95854b843f978a4ada16eff614c (diff)
downloadsqlite-5b9973d89849c318b0500de1fa0019181e7bd3c0.tar.gz
sqlite-5b9973d89849c318b0500de1fa0019181e7bd3c0.zip
WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.
FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
Diffstat (limited to 'ext/wasm/api/sqlite3-api-worker1.js')
-rw-r--r--ext/wasm/api/sqlite3-api-worker1.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/wasm/api/sqlite3-api-worker1.js b/ext/wasm/api/sqlite3-api-worker1.js
index d9a943971..d60621ada 100644
--- a/ext/wasm/api/sqlite3-api-worker1.js
+++ b/ext/wasm/api/sqlite3-api-worker1.js
@@ -154,12 +154,12 @@
messageId: ...as above...,
result: {
- persistentDirName: path prefix, if any, of persistent storage.
+ wasmfsOpfsDir: path prefix, if any, of persistent storage.
An empty string denotes that no persistent storage is available.
bigIntEnabled: bool. True if BigInt support is enabled.
- persistenceEnabled: true if persistent storage is enabled in the
+ wasmfsOpfsEnabled: true if persistent storage is enabled in the
current environment. Only files stored under persistentDirName
will persist, however.
@@ -183,7 +183,7 @@
See the sqlite3.oo1.DB constructor for peculiarities and transformations,
persistent [=false]: if true and filename is not one of ("",
- ":memory:"), prepend sqlite3.capi.sqlite3_web_persistent_dir()
+ ":memory:"), prepend sqlite3.capi.sqlite3_wasmfs_opfs_dir()
to the given filename so that it is stored in persistent storage
_if_ the environment supports it. If persistent storage is not
supported, the filename is used as-is.
@@ -438,7 +438,7 @@ sqlite3.initWorker1API = function(){
toss("Throwing because of simulateError flag.");
}
const rc = Object.create(null);
- const pDir = sqlite3.capi.sqlite3_web_persistent_dir();
+ const pDir = sqlite3.capi.sqlite3_wasmfs_opfs_dir();
if(!args.filename || ':memory:'===args.filename){
oargs.filename = args.filename || '';
}else if(pDir){
@@ -521,11 +521,11 @@ sqlite3.initWorker1API = function(){
'config-get': function(){
const rc = Object.create(null), src = sqlite3.config;
[
- 'persistentDirName', 'bigIntEnabled'
+ 'wasmfsOpfsDir', 'bigIntEnabled'
].forEach(function(k){
if(Object.getOwnPropertyDescriptor(src, k)) rc[k] = src[k];
});
- rc.persistenceEnabled = !!sqlite3.capi.sqlite3_web_persistent_dir();
+ rc.wasmfsOpfsEnabled = !!sqlite3.capi.sqlite3_wasmfs_opfs_dir();
return rc;
},