Open
Description
Hi, we're looking to connect to an OPFS stored SQLLite instance running in WASM, however, we are required to use the SHA Pool for connection (we're unable to control/change the security headers from the server that would allow alternative OPFS approaches).
Ideally, this would work:
const sqlite3 = await sqlite3InitModule();
const poolUtil = await sqlite3.installOpfsSAHPoolVfs({ directory: '/data' });
const accessPool = new poolUtil.OpfsSAHPoolDb('my-db');
const client: Client = createClient({ url: `opfs-ahp://${accessPool.filename}` });
I appreciate that opfs-ahp
is not a currently supported protocol, and I wanted to ask if this might be added in the future?
As a reference example, this is supported by PGLite
- https://pglite.dev/docs/filesystems#opfs-ahp-fs (although not on Safari due to the access limited that is required for PG files).
- https://github.com/electric-sql/pglite/blob/main/packages/pglite/src/fs/opfs-ahp.ts
Metadata
Metadata
Assignees
Labels
No labels