DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/query-db-collection/type-aliases/SyncOperation.md
SyncOperation
ts
type SyncOperation<TRow, TKey, TInsertInput> =
| {
data: TInsertInput | TInsertInput[];
type: "insert";
}
| {
data: Partial<TRow> | Partial<TRow>[];
type: "update";
}
| {
key: TKey | TKey[];
type: "delete";
}
| {
data: Partial<TRow> | Partial<TRow>[];
type: "upsert";
};Defined in: packages/query-db-collection/src/manual-sync.ts:30
Type Parameters#
TRow#
TRow extends object
TKey#
TKey extends string | number = string | number
TInsertInput#
TInsertInput extends object = TRow