import { ILogger } from 'js-logger'; import { DBAdapter, Transaction } from '../../../db/DBAdapter.js'; import { BaseObserver } from '../../../utils/BaseObserver.js'; import { BucketOperationProgress, BucketState, BucketStorageAdapter, BucketStorageListener, Checkpoint, PowerSyncControlCommand, SyncLocalDatabaseResult } from './BucketStorageAdapter.js'; import { CrudBatch } from './CrudBatch.js'; import { CrudEntry } from './CrudEntry.js'; import { SyncDataBatch } from './SyncDataBatch.js'; export declare class SqliteBucketStorage extends BaseObserver implements BucketStorageAdapter { private db; private logger; tableNames: Set; private _hasCompletedSync; private updateListener; private _clientId?; constructor(db: DBAdapter, logger?: ILogger); init(): Promise; dispose(): Promise; _getClientId(): Promise; getClientId(): Promise; getMaxOpId(): string; /** * Reset any caches. */ startSession(): void; getBucketStates(): Promise; getBucketOperationProgress(): Promise; saveSyncData(batch: SyncDataBatch, fixedKeyFormat?: boolean): Promise; removeBuckets(buckets: string[]): Promise; /** * Mark a bucket for deletion. */ private deleteBucket; hasCompletedSync(): Promise; syncLocalDatabase(checkpoint: Checkpoint, priority?: number): Promise; /** * Atomically update the local state to the current checkpoint. * * This includes creating new tables, dropping old tables, and copying data over from the oplog. */ private updateObjectsFromBuckets; validateChecksums(checkpoint: Checkpoint, priority: number | undefined): Promise; updateLocalTarget(cb: () => Promise): Promise; nextCrudItem(): Promise; hasCrud(): Promise; /** * Get a batch of objects to send to the server. * When the objects are successfully sent to the server, call .complete() */ getCrudBatch(limit?: number): Promise; writeTransaction(callback: (tx: Transaction) => Promise, options?: { timeoutMs: number; }): Promise; /** * Set a target checkpoint. */ setTargetCheckpoint(checkpoint: Checkpoint): Promise; control(op: PowerSyncControlCommand, payload: string | Uint8Array | ArrayBuffer | null): Promise; hasMigratedSubkeys(): Promise; migrateToFixedSubkeys(): Promise; static _subkeyMigrationKey: string; }