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

TransactionConfig.md

58 lines1.1 KB

1---
2id: TransactionConfig
3title: TransactionConfig
4---
5​
6# Interface: TransactionConfig\<T\>
7​
8Defined in: [packages/db/src/types.ts:168](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L168)
9​
10## Type Parameters
11​
12### T
13​
14`T` *extends* `object` = `Record`\<`string`, `unknown`\>
15​
16## Properties
17​
18### autoCommit?
19​
20```ts
21optional autoCommit: boolean;
22```
23​
24Defined in: [packages/db/src/types.ts:172](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L172)
25​
26***
27​
28### id?
29​
30```ts
31optional id: string;
32```
33​
34Defined in: [packages/db/src/types.ts:170](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L170)
35​
36Unique identifier for the transaction
37​
38***
39​
40### metadata?
41​
42```ts
43optional metadata: Record<string, unknown>;
44```
45​
46Defined in: [packages/db/src/types.ts:175](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L175)
47​
48Custom metadata to associate with the transaction
49​
50***
51​
52### mutationFn
53​
54```ts
55mutationFn: MutationFn<T>;
56```
57​
58Defined in: [packages/db/src/types.ts:173](https://github.com/TanStack/db/blob/main/packages/db/src/types.ts#L173)