Skip to content

Commit dda1c8a

Browse files
committed
fix(kysely-bun-worker)!: correct option key typo
1 parent ea7a791 commit dda1c8a

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

packages/dialect-bun-worker/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export class BunWorkerDialect extends GenericSqliteWorkerDialect<globalThis.Work
1414
constructor(config?: BunWorkerDialectConfig) {
1515
const {
1616
url: fileName = ':memory:',
17-
cacheStatment: cache = false,
17+
cacheStatement = false,
1818
onCreateConnection,
1919
worker = new Worker(new URL('./worker', import.meta.url), { type: 'module' }),
2020
dbOptions: opt = { create: true },
2121
} = config || {}
2222
super(
2323
() => ({
24-
data: { cache, fileName, opt },
24+
data: { cache: cacheStatement, fileName, opt },
2525
mitt: createNodeMitt(),
2626
handle: handleWebWorker,
2727
worker,

packages/dialect-bun-worker/src/normal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ export class BunSqliteDialect extends GenericSqliteDialect {
1111
constructor(config?: BunSqliteDialectConfig) {
1212
const {
1313
url = ':memory:',
14-
cacheStatment = false,
14+
cacheStatement = false,
1515
onCreateConnection,
1616
dbOptions = { create: true },
1717
} = config || {}
1818
super(
19-
() => createSqliteExecutor(new Database(url, dbOptions), cacheStatment),
19+
() => createSqliteExecutor(new Database(url, dbOptions), cacheStatement),
2020
onCreateConnection,
2121
)
2222
}

packages/dialect-bun-worker/src/type.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export interface BunWorkerDialectConfig extends IBaseSqliteDialectConfig {
1616
* @default { create: true }
1717
*/
1818
dbOptions?: DBOptions
19-
cacheStatment?: boolean
19+
/**
20+
* use `bun:sqlite` built-in statement cache
21+
* @see https://bun.sh/docs/api/sqlite#query
22+
*/
23+
cacheStatement?: boolean
2024
/**
2125
* custom worker, default is a worker that use bun:sqlite
2226
*/
@@ -37,10 +41,10 @@ export interface BunSqliteDialectConfig extends IBaseSqliteDialectConfig {
3741
*/
3842
url?: string
3943
/**
40-
* use `bun:sqlite` built-in statment cache
44+
* use `bun:sqlite` built-in statement cache
4145
* @see https://bun.sh/docs/api/sqlite#query
4246
*/
43-
cacheStatment?: boolean
47+
cacheStatement?: boolean
4448
/**
4549
* DB constructor options
4650
* @default { create: true }

0 commit comments

Comments
 (0)