File tree Expand file tree Collapse file tree
packages/dialect-bun-worker/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments