PendingMutation

Interface: PendingMutation<T, TOperation, TCollection>

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

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>;
changes: ResolveTransactionChanges<T, TOperation>;

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


collection

ts
collection: TCollection;
collection: TCollection;

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


createdAt

ts
createdAt: Date;
createdAt: Date;

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


globalKey

ts
globalKey: string;
globalKey: string;

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


key

ts
key: any;
key: any;

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


metadata

ts
metadata: unknown;
metadata: unknown;

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


modified

ts
modified: T;
modified: T;

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


mutationId

ts
mutationId: string;
mutationId: string;

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


optimistic

ts
optimistic: boolean;
optimistic: boolean;

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

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


original

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

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


syncMetadata

ts
syncMetadata: Record<string, unknown>;
syncMetadata: Record<string, unknown>;

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


type

ts
type: TOperation;
type: TOperation;

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


updatedAt

ts
updatedAt: Date;
updatedAt: Date;

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

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.