Skip to content

Commit f1de04e

Browse files
committed
fix(builder): fix savepoint name
1 parent 44c0292 commit f1de04e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/sqlite-builder/src/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class SqliteBuilder<DB extends Record<string, any>> {
170170
}
171171
this.trxCount++
172172
this.logger?.debug(`run in savepoint: sp_${this.trxCount}`)
173-
return await runWithSavePoint(this.trx!, fn, `sp_${this.trxCount})`)
173+
return await runWithSavePoint(this.trx!, fn, `sp_${this.trxCount}`)
174174
.then(async (result) => {
175175
await options.afterCommit?.()
176176
return result

playground/src/modules/wasqlite.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { getAsyncWasmURL, initSQLite } from '@subframe7536/sqlite-wasm'
1+
import { initSQLite } from '@subframe7536/sqlite-wasm'
22
import { useIdbStorage } from '@subframe7536/sqlite-wasm/idb'
33
import { WaSqliteDialect } from 'kysely-wasm'
4+
import url from '@subframe7536/sqlite-wasm/wasm-async?url'
45
import { testDB } from './utils'
56

67
const dialect = new WaSqliteDialect({
78
async database() {
8-
return await initSQLite(useIdbStorage('test idb', {
9-
url: getAsyncWasmURL(),
10-
}))
9+
return await initSQLite(useIdbStorage('test idb', { url }))
1110
},
1211
})
1312

0 commit comments

Comments
 (0)