We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dda1c8a commit 7dec5f5Copy full SHA for 7dec5f5
1 file changed
packages/dialect-bun-worker/src/index.ts
@@ -12,13 +12,16 @@ export class BunWorkerDialect extends GenericSqliteWorkerDialect<globalThis.Work
12
* dialect for `bun:sqlite`, run sql in worker
13
*/
14
constructor(config?: BunWorkerDialectConfig) {
15
- const {
+ let {
16
url: fileName = ':memory:',
17
cacheStatement = false,
18
onCreateConnection,
19
- worker = new Worker(new URL('./worker', import.meta.url), { type: 'module' }),
+ worker,
20
dbOptions: opt = { create: true },
21
} = config || {}
22
+ if (!worker) {
23
+ worker = new Worker(new URL('./worker', import.meta.url), { type: 'module' })
24
+ }
25
super(
26
() => ({
27
data: { cache: cacheStatement, fileName, opt },
0 commit comments