API reference / @evolu/common / local-first / CreateBaseSqliteStorageConfig
Interface: CreateBaseSqliteStorageConfig
Defined in: packages/common/src/local-first/Storage.ts:358
Extends
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
isOwnerWithinQuota | readonly | (ownerId, requiredBytes) => MaybeAsync<boolean> | Callback called before an attempt to write, to check if an OwnerId has sufficient quota for the write. The callback receives the OwnerId and the total bytes that would be stored after the write (current stored bytes plus incoming bytes), and returns a MaybeAsync boolean: true to allow the write, or false to deny it due to quota limits. The callback can be synchronous (for SQLite or in-memory checks) or asynchronous (for calling remote APIs). The callback returns a boolean rather than an error because error handling and logging are the responsibility of the callback implementation. ### Example // Client // evolu.subscribeError // Relay isOwnerWithinQuota: (ownerId, requiredBytes) => { console.log(ownerId, requiredBytes); // Check error via evolu.subscribeError return true; }; | StorageConfig.isOwnerWithinQuota | packages/common/src/local-first/Storage.ts:68 |
onStorageError | public | (error) => void | - | - | packages/common/src/local-first/Storage.ts:359 |