Skip to content

Support for opfs-ahp:// when creating a client to access OPFS via the SHA Pool #317

Open
@JRGranell

Description

@JRGranell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions