TanStack

PendingMutation

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

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

Type Parameters

T

T extends object = Record<string, unknown>

TOperation

TOperation extends OperationType = OperationType

TCollection

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

Properties

changes

ts
changes: ResolveTransactionChanges<T, TOperation>;

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


collection

ts
collection: TCollection;

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


createdAt

ts
createdAt: Date;

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


globalKey

ts
globalKey: string;

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


key

ts
key: TCollection extends Collection<any, TKey, any, any, any> ? TKey : never;

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


metadata

ts
metadata: unknown;

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


modified

ts
modified: T;

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


mutationId

ts
mutationId: string;

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


optimistic

ts
optimistic: boolean;

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

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


original

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

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


syncMetadata

ts
syncMetadata: Record<string, unknown>;

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


type

ts
type: TOperation;

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


updatedAt

ts
updatedAt: Date;

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