Skip to content

Commit

Permalink
neaten crud throttle options
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney committed Jan 15, 2024
1 parent 9bc088d commit 1f08fc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<PowerSyncDatabaseOptions> {
schema: Schema;
/**
* Filename for the database.
Expand All @@ -26,7 +26,8 @@ export abstract class AbstractPowerSyncDatabaseOpenFactory {
generateOptions(): PowerSyncDatabaseOptions {
return {
database: this.openDB(),
schema: this.schema
schema: this.schema,
...this.options
};
}

Expand Down

0 comments on commit 1f08fc5

Please sign in to comment.