aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-01-11 12:56:03 +0000
committerstephan <stephan@noemail.net>2024-01-11 12:56:03 +0000
commitbb9ab35ab14148cf28c3f7c8269d8af960ba7985 (patch)
treebda2eee3f0bf54f574756a9b0e64bfd68f280932 /ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
parent598328209f421d48e98115dd6816da5114403616 (diff)
downloadsqlite-bb9ab35ab14148cf28c3f7c8269d8af960ba7985.tar.gz
sqlite-bb9ab35ab14148cf28c3f7c8269d8af960ba7985.zip
Remove some dead JS code. Minor doc cleanups.
FossilOrigin-Name: bf23cf204976516651b1c4c39ced21cd858dea4ba88052d96fc4f5f11525f170
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-vfs-opfs.c-pp.js24
1 files changed, 2 insertions, 22 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
index af89f216f..f7c92100a 100644
--- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
+++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
@@ -245,7 +245,8 @@ const installOpfsVfs = function callee(options){
opfsIoMethods.$iVersion = 1;
opfsVfs.$iVersion = 2/*yes, two*/;
opfsVfs.$szOsFile = capi.sqlite3_file.structInfo.sizeof;
- opfsVfs.$mxPathname = 1024/*sure, why not?*/;
+ opfsVfs.$mxPathname = 1024/* sure, why not? The OPFS name length limit
+ is undocumented/unspecified. */;
opfsVfs.$zName = wasm.allocCString("opfs");
// All C-side memory of opfsVfs is zeroed out, but just to be explicit:
opfsVfs.$xDlOpen = opfsVfs.$xDlError = opfsVfs.$xDlSym = opfsVfs.$xDlClose = null;
@@ -994,27 +995,6 @@ const installOpfsVfs = function callee(options){
opfsUtil.randomFilename = randomFilename;
/**
- Re-registers the OPFS VFS. This is intended only for odd use
- cases which have to call sqlite3_shutdown() as part of their
- initialization process, which will unregister the VFS
- registered by installOpfsVfs(). If passed a truthy value, the
- OPFS VFS is registered as the default VFS, else it is not made
- the default. Returns the result of the the
- sqlite3_vfs_register() call.
-
- Design note: the problem of having to re-register things after
- a shutdown/initialize pair is more general. How to best plug
- that in to the library is unclear. In particular, we cannot
- hook in to any C-side calls to sqlite3_initialize(), so we
- cannot add an after-initialize callback mechanism.
- */
- opfsUtil.registerVfs = (asDefault=false)=>{
- return wasm.exports.sqlite3_vfs_register(
- opfsVfs.pointer, asDefault ? 1 : 0
- );
- };
-
- /**
Returns a promise which resolves to an object which represents
all files and directories in the OPFS tree. The top-most object
has two properties: `dirs` is an array of directory entries