API reference › @evolu/common › local‑first/Schema › ConditionalMutationChange
Defined in: packages/common/src/local-first/Schema.ts:686
A MutationChange that can apply only while its row is as given, which the DbWorker's transaction checks. Evolu makes such changes itself, such as for createEvoluApp's device database; a Mutation never makes one.
Extends
Properties
id
id: string & Brand<"Id">;
Inherited from
isDelete
isDelete: boolean | null;
Inherited from
isInsert
isInsert: boolean;
Inherited from
onlyIf?
readonly onlyIf?: MutationChangeCondition;
Defined in: packages/common/src/local-first/Schema.ts:694
Applies a change of a local-only table only while its row is as given. A tab decides a change from the rows it read, which another tab's change may already have made outdated, and changes from different tabs reach the DbWorker in no guaranteed order, so such a change then changes nothing instead of writing over the other one.
ownerId
readonly ownerId: string & Brand<"Id"> & Brand<"OwnerId">;
Defined in: packages/common/src/local-first/Schema.ts:675
Inherited from
table
table: string;
Inherited from
values
values: Readonly<
Partial<
Record<
string,
| string
| Uint8Array<ArrayBufferLike>
| (number & Brand<"NonNaN"> & Brand<"Finite">)
| null
>
>
> & Brand<"ValidDbChangeValues">;