diff options
author | stephan <stephan@noemail.net> | 2022-10-03 13:46:20 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-03 13:46:20 +0000 |
commit | 57956a9c86d19aa9728d58e015fa87b0acd5a99a (patch) | |
tree | 1b885d0509a3b5880f324101745282b7566c9dad /ext/wasm/api | |
parent | 4f5bbedb3aad0095caef387dc66e884bfc1f1675 (diff) | |
download | sqlite-57956a9c86d19aa9728d58e015fa87b0acd5a99a.tar.gz sqlite-57956a9c86d19aa9728d58e015fa87b0acd5a99a.zip |
Resolve/remove a TODO.
FossilOrigin-Name: 2ea35fea3bac2637e935643edfa7913b792e529de3a8980dbb8678d98ed5bcf9
Diffstat (limited to 'ext/wasm/api')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 37c292840..b78c9b68e 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -242,20 +242,20 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ is ignored. - "t": enable tracing of SQL executed on this database handle, - sending it to `console.log()`. Once enabled, it cannot - currently be easily switched off (TODO). + sending it to `console.log()`. To disable it later, call + `sqlite3.capi.sqlite3_trace_v2(thisDb.pointer, 0, 0, 0)`. - If "w" is not provided, the db is implicitly read-only, noting that - "rc" is meaningless + If "w" is not provided, the db is implicitly read-only, noting + that "rc" is meaningless Any other letters are currently ignored. The default is "c". These modes are ignored for the special ":memory:" and "" - names. + names and _may_ be ignored altogether for certain VFSes. The final argument is analogous to the final argument of sqlite3_open_v2(): the name of an sqlite3 VFS. Pass a falsy value, or none at all, to use the default. If passed a value, it must - be the string name of a VFS + be the string name of a VFS. The constructor optionally (and preferably) takes its arguments in the form of a single configuration object with the following @@ -266,17 +266,20 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ - `.vfs`: the VFS fname The `filename` and `vfs` arguments may be either JS strings or - C-strings allocated via WASM. + C-strings allocated via WASM. `flags` is required to be a JS + string (because it's specific to this API, which is specific + to JS). For purposes of passing a DB instance to C-style sqlite3 functions, the DB object's read-only `pointer` property holds its `sqlite3*` pointer value. That property can also be used to check whether this DB instance is still open. - In the main window thread, the filenames ":localStorage:" and - ":sessionStorage:" are special: they cause the db to use either + In the main window thread, the filenames `":localStorage:"` and + `":sessionStorage:"` are special: they cause the db to use either localStorage or sessionStorage for storing the database using - the kvvfs. + the kvvfs. If one of these names are used, they trump + any vfs name set in the arguments. */ const DB = function(...args){ dbCtorHelper.apply(this, args); |