Defined in: packages/db/src/query/effect.ts:107
Effect configuration
TRow extends object = Record<string, unknown>
TKey extends string | number = string | number
optional id: string;Defined in: packages/db/src/query/effect.ts:112
Optional ID for debugging/tracing
optional onBatch: EffectBatchHandler<TRow, TKey>;Defined in: packages/db/src/query/effect.ts:127
Called once per graph run with all delta events from that batch
optional onEnter: EffectEventHandler<TRow, TKey>;Defined in: packages/db/src/query/effect.ts:118
Called once for each row entering the query result
optional onError: (error, event) => void;Defined in: packages/db/src/query/effect.ts:130
Error handler for exceptions thrown by effect callbacks
Error
DeltaEvent<TRow, TKey>
void
optional onExit: EffectEventHandler<TRow, TKey>;Defined in: packages/db/src/query/effect.ts:124
Called once for each row exiting the query result
optional onSourceError: (error) => void;Defined in: packages/db/src/query/effect.ts:137
Called when a source collection enters an error or cleaned-up state. The effect is automatically disposed after this callback fires. If not provided, the error is logged to console.error.
Error
void
optional onUpdate: EffectEventHandler<TRow, TKey>;Defined in: packages/db/src/query/effect.ts:121
Called once for each row updating within the query result
query: EffectQueryInput<any>;Defined in: packages/db/src/query/effect.ts:115
Query to watch for deltas
optional skipInitial: boolean;Defined in: packages/db/src/query/effect.ts:144
Skip deltas during initial collection load. Defaults to false (process all deltas including initial sync). Set to true for effects that should only process new changes.