Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/sql-sqlite-wasm/src/OpfsWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import type { OpfsWorkerMessage } from "./internal/opfsWorker.js"
export interface OpfsWorkerConfig {
readonly port: EventTarget & Pick<MessagePort, "postMessage" | "close">
readonly dbName: string
readonly config: Parameters<typeof SQLiteESMFactory>[0]
}

/**
Expand All @@ -26,7 +27,7 @@ export const run = (
options: OpfsWorkerConfig
): Effect.Effect<void, SqlError> =>
Effect.gen(function*() {
const factory = yield* Effect.promise(() => SQLiteESMFactory())
const factory = yield* Effect.promise(() => SQLiteESMFactory(options.config))
const sqlite3 = WaSqlite.Factory(factory)
const vfs = yield* Effect.promise(() => AccessHandlePoolVFS.create("opfs", factory))
sqlite3.vfs_register(vfs, false)
Expand Down
Loading