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

pendingmutation.md

153 lines3.1 KB

Interface: PendingMutation<T, TOperation, TCollection>

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

Represents a pending mutation within a transaction Contains information about the original and modified data, as well as metadata

Type Parameters

• T extends object = Record<string, unknown>

• TOperation extends OperationType = OperationType

• TCollection extends Collection<T, any, any, any, any> = Collection<T, any, any, any, any>

Properties

changes

changes: ResolveTransactionChanges<T, TOperation>;

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


collection

collection: TCollection;

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


createdAt

createdAt: Date;

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


globalKey

globalKey: string;

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


key

key: any;

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


metadata

metadata: unknown;

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


modified

modified: T;

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


mutationId

mutationId: string;

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


optimistic

optimistic: boolean;

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

Whether this mutation should be applied optimistically (defaults to true)


original

original: TOperation extends "insert" ? object : T;

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


syncMetadata

syncMetadata: Record<string, unknown>;

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


type

type: TOperation;

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


updatedAt

updatedAt: Date;

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