SyncChangesOptions
Import
import { SyncChangesOptions } from "@hyper-fetch/db"
Source
Package
Preview
type SyncChangesOptions<Row,KeyField,Listener,Mapped> = {
byKey?: (key: NonNullable<Row[KeyField]>) => ListenerPatch;
changes: (event: SyncEvent<Listener>) => { delete: readonly NonNullable<Row[KeyField]>[]; refetch?: readonly NonNullable<Row[KeyField]>[]; upsert: readonly Mapped[] };
notation?: (conditions: readonly ComparisonNode[]) => ListenerPatch;
resumes?: boolean;
}
Structure
SyncChangesOptions
| Name | Type | Description |
|---|---|---|
| resumes | | The adapter resumes the subscription from its last event id after a reconnect, so nothing is missed |
| byKey | | Listener params that keep one row read by key live, such as a listener on one document |
| changes | | Reads the complete rows to write and the keys to delete from one event |
| notation | | Turns a subset's sent conditions into listener params, so the sync covers every subset |
