Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

syncconfig.md

93 lines1.6 KB

1---
2id: SyncConfig
3title: SyncConfig
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8# Interface: SyncConfig\<T, TKey\>
9​
10Defined in: [packages/db/src/types.ts:200](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L200)
11​
12## Type Parameters
13​
14• **T** *extends* `object` = `Record`\<`string`, `unknown`\>
15​
16• **TKey** *extends* `string` \| `number` = `string` \| `number`
17​
18## Properties
19​
20### getSyncMetadata()?
21​
22```ts
23optional getSyncMetadata: () => Record<string, unknown>;
24```
25​
26Defined in: [packages/db/src/types.ts:216](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L216)
27​
28Get the sync metadata for insert operations
29​
30#### Returns
31​
32`Record`\<`string`, `unknown`\>
33​
34Record containing relation information
35​
36***
37​
38### rowUpdateMode?
39​
40```ts
41optional rowUpdateMode: "partial" | "full";
42```
43​
44Defined in: [packages/db/src/types.ts:225](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L225)
45​
46The row update mode used to sync to the collection.
47​
48#### Default
49​
50`partial`
51​
52#### Description
53​
54- `partial`: Updates contain only the changes to the row.
55- `full`: Updates contain the entire row.
56​
57***
58​
59### sync()
60​
61```ts
62sync: (params) => void;
63```
64​
65Defined in: [packages/db/src/types.ts:204](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L204)
66​
67#### Parameters
68​
69##### params
70​
71###### begin
72​
73() => `void`
74​
75###### collection
76​
77[`Collection`](../collection.md)\<`T`, `TKey`, `any`, `any`, `any`\>
78​
79###### commit
80​
81() => `void`
82​
83###### markReady
84​
85() => `void`
86​
87###### write
88​
89(`message`) => `void`
90​
91#### Returns
92​
93`void`