File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -42,5 +42,5 @@ export const createPowerSyncPersister = ((
4242 onIgnoredError ,
4343 powerSync ,
4444 'getPowerSync' ,
45- false ,
45+ true ,
4646 ) as PowerSyncPersister ) as typeof createPowerSyncPersisterDecl ;
Original file line number Diff line number Diff line change @@ -59,13 +59,15 @@ type AbstractPowerSyncDatabase = {
5959
6060class WASQLitePowerSyncDatabaseOpenFactory {
6161 public dbFilename : string ;
62+ public db : sqlite3 . Database ;
6263
6364 constructor ( { schema : _ , dbFilename} : { schema : Schema ; dbFilename : string } ) {
6465 this . dbFilename = dbFilename ;
66+ this . db = new sqlite3 . Database ( this . dbFilename ) ;
6567 }
6668
6769 getInstance ( ) : AbstractPowerSyncDatabase {
68- const db = new sqlite3 . Database ( this . dbFilename ) ;
70+ const db = this . db ;
6971
7072 const instance : AbstractPowerSyncDatabase = {
7173 execute : ( sql , args ) =>
@@ -209,6 +211,7 @@ export const VARIANTS: {[name: string]: SqliteVariant<any>} = {
209211 ( ps : AbstractPowerSyncDatabase , sql : string , args : any [ ] = [ ] ) =>
210212 ps . execute ( sql , args ) . then ( ( result ) => result . rows ?. _array ?? [ ] ) ,
211213 ( ps : AbstractPowerSyncDatabase ) => ps . close ( ) ,
214+ 1000 ,
212215 ] ,
213216 sqlite3 : [
214217 async ( ) : Promise < Database > => new sqlite3 . Database ( ':memory:' ) ,
You can’t perform that action at this time.
0 commit comments