Package: @effect/platform-browser
Module: IndexedDbQueryBuilder
Effect model for deleting rows from a table, with optional key-range, limit, filter, and reactivity invalidation helpers.
Signature
export interface Delete<
Table extends IndexedDbTable.AnyWithProps,
Index extends IndexedDbDatabase.IndexFromTable<Table>,
ExcludedKeys extends string = never
> extends Effect.Effect<void, IndexedDbQueryError> {
readonly delete: DeletePartial<Table, Index>
readonly index?: Index
readonly limitValue?: number
readonly only?: ExtractIndexType<Table, Index>
readonly lowerBound?: ExtractIndexType<Table, Index>
readonly upperBound?: ExtractIndexType<Table, Index>
readonly excludeLowerBound?: boolean
readonly excludeUpperBound?: boolean
readonly predicate?: (item: IndexedDbTable.Encoded<Table>) => boolean
readonly limit: (
limit: number
) => DeleteWithout<Table, Index, ExcludedKeys | "limit">
readonly filter: (
f: (value: IndexedDbTable.Encoded<Table>) => boolean
) => DeleteWithout<Table, Index, ExcludedKeys>
/**
* Invalidate any queries using Reactivity service with the provided keys.
*
* **Details**
*
* If no keys are provided, the table name is used as the reactivity key.
*/
readonly invalidate: (
keys?: ReadonlyArray<unknown> | Record.ReadonlyRecord<string, ReadonlyArray<unknown>> | undefined
) => Effect.Effect<void, IndexedDbQueryError, IndexedDbTable.Context<Table>>
}
Since v4.0.0