await open('name', 'storage', 'access').
Supported values for storage are:
opfs: Uses the Origin private file systemindexedDb: Uses a virtualized file system implemented by storing chunks in IndexedDBinMemory: Only stores files in memory without persistence.access are:
throughSharedWorker: Open the database in a shared worker. Different tabs will use the same sqlite3 connectionthroughDedicatedWorker: Open the database in a dedicated worker. Requires shared array buffers when used with OPFS, and there is no synchronization for IndexedDB in dedicated workers.inCurrentContext: Open the database in the current context, without a workerexecute in the console to run
SQL on it, e.g:
let db = await open('test', 'inMemory', 'throughSharedWorker');
await execute(db, 'create table foo (bar);');