Skip to content

Commit

Permalink
Revert changes to powersync constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mugikhan committed Sep 12, 2024
1 parent 8836706 commit 91d9708
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-native/src/db/PowerSyncDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import {
BucketStorageAdapter,
DBAdapter,
PowerSyncBackendConnector,
PowerSyncDatabaseOptionsWithOpenFactory,
PowerSyncDatabaseOptionsWithSettings,
SqliteBucketStorage
} from '@powersync/common';
import { ReactNativeRemote } from '../sync/stream/ReactNativeRemote';
import { ReactNativeStreamingSyncImplementation } from '../sync/stream/ReactNativeStreamingSyncImplementation';
import { ReactNativeQuickSqliteOpenFactory } from './adapters/react-native-quick-sqlite/ReactNativeQuickSQLiteOpenFactory';

/**
* A PowerSync database which provides SQLite functionality
Expand All @@ -31,8 +32,8 @@ export class PowerSyncDatabase extends AbstractPowerSyncDatabase {
* Opens a DBAdapter using React Native Quick SQLite as the
* default SQLite open factory.
*/
protected openDBAdapter(options: PowerSyncDatabaseOptionsWithOpenFactory): DBAdapter {
const defaultFactory = options.database;
protected openDBAdapter(options: PowerSyncDatabaseOptionsWithSettings): DBAdapter {
const defaultFactory = new ReactNativeQuickSqliteOpenFactory(options.database);
return defaultFactory.openDB();
}

Expand Down

0 comments on commit 91d9708

Please sign in to comment.