📄 tanstack/db/latest/docs/reference/interfaces/SyncConfig

File: SyncConfig.md | Updated: 11/15/2025

Source: https://tanstack.com/db/latest/docs/reference/interfaces/SyncConfig



TanStack

DB v0v0

Search...

+ K

Auto

Log In

TanStack StartRC

Docs Examples GitHub Contributors

TanStack Router

Docs Examples GitHub Contributors

TanStack Query

Docs Examples GitHub Contributors

TanStack Table

Docs Examples Github Contributors

TanStack Formnew

Docs Examples Github Contributors

TanStack DBbeta

Docs Github Contributors

TanStack Virtual

Docs Examples Github Contributors

TanStack Paceralpha

Docs Examples Github Contributors

TanStack Storealpha

Docs Examples Github Contributors

TanStack Devtoolsalpha

Docs Github Contributors

More Libraries

Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide

Documentation

Framework

React logo

React

Version

Latest

Search...

+ K

Menu

Getting Started

Guides

Collections

Frameworks

Community

API Reference

Framework

React logo

React

Version

Latest

Menu

Getting Started

Guides

Collections

Frameworks

Community

API Reference

On this page

SyncConfig

Copy Markdown

Interface: SyncConfig<T, TKey>
==============================

Defined in: packages/db/src/types.ts:263

Type Parameters
---------------
### T

T extends object = Record<string, unknown>

### TKey

TKey extends string | number = string | number

Properties
----------
### getSyncMetadata()?

ts

optional getSyncMetadata: () => Record<string, unknown>;


optional getSyncMetadata: () => Record<string, unknown>;

Defined in: packages/db/src/types.ts:280

Get the sync metadata for insert operations

#### Returns

Record<string, unknown>

Record containing relation information


### rowUpdateMode?

ts

optional rowUpdateMode: "full" | "partial";


optional rowUpdateMode: "full" | "partial";

Defined in: packages/db/src/types.ts:289

The row update mode used to sync to the collection.

#### Default

partial

#### Description

  • partial: Updates contain only the changes to the row.
  • full: Updates contain the entire row.

### sync()

ts

sync: (params) => 
  | void
  | CleanupFn
  | SyncConfigRes;


sync: (params) => 
  | void
  | CleanupFn
  | SyncConfigRes;

Defined in: packages/db/src/types.ts:267

#### Parameters ##### params ###### begin

() => void

###### collection

Collection <T, TKey, any, any, any>

###### commit

() => void

###### markReady

() => void

###### truncate

() => void

###### write

(message) => void

#### Returns

| void | CleanupFn | SyncConfigRes

Edit on GitHub

Home

Partners Become a Partner

Code RabbitCode Rabbit CloudflareCloudflare AG GridAG Grid NetlifyNetlify NeonNeon WorkOSWorkOS ClerkClerk ConvexConvex ElectricElectric SentrySentry PrismaPrisma StrapiStrapi UnkeyUnkey

scarf analytics