diff --git a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts index aebc112b..35f9df11 100644 --- a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts +++ b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts @@ -22,7 +22,16 @@ import { EventIterator } from 'event-iterator'; export interface PowerSyncDatabaseOptions { schema: Schema; database: DBAdapter; + /** + * Delay for retrying sync streaming operations + * from the PowerSync backend after an error occurs. + */ retryDelay?: number; + /** + * Backend Connector CRUD operations are throttled + * to occur at most every `crudUploadThrottleMs` + * milliseconds. + */ crudUploadThrottleMs?: number; logger?: ILogger; } diff --git a/packages/powersync-sdk-common/src/client/AbstractPowerSyncOpenFactory.ts b/packages/powersync-sdk-common/src/client/AbstractPowerSyncOpenFactory.ts index a94a09ce..bcc7fe62 100644 --- a/packages/powersync-sdk-common/src/client/AbstractPowerSyncOpenFactory.ts +++ b/packages/powersync-sdk-common/src/client/AbstractPowerSyncOpenFactory.ts @@ -2,7 +2,7 @@ import { DBAdapter } from '../db/DBAdapter'; import { Schema } from '../db/schema/Schema'; import { AbstractPowerSyncDatabase, PowerSyncDatabaseOptions } from './AbstractPowerSyncDatabase'; -export interface PowerSyncOpenFactoryOptions { +export interface PowerSyncOpenFactoryOptions extends Partial { schema: Schema; /** * Filename for the database. @@ -26,7 +26,8 @@ export abstract class AbstractPowerSyncDatabaseOpenFactory { generateOptions(): PowerSyncDatabaseOptions { return { database: this.openDB(), - schema: this.schema + schema: this.schema, + ...this.options }; }