Skip to content

PatchEntityChanges

PatchEntityChanges<S> = object

Defined in: src/actions/wallet/patchEntity.ts:22

What a patch changes.

A patch names only what changes. Columns it does not mention keep whatever value they have — so a caller can change one column without first reading the entity to learn what the others are, and without racing anyone else who is changing a different one.

{ set: { title: "Cells, not entities", score: dec("4.2") }, unset: ["thumbnail"] }

S extends Schema = Schema

The schema the changes are typed by.

optional set: PatchEntityValues<S>

Defined in: src/actions/wallet/patchEntity.ts:30

Columns to write, keyed by name. Each is written with the indexed flag its column declares, so writing a column whose indexing the schema has since changed changes it on the entity too. Defaults do not apply: a patch writes only what it names.

If a name is not a column, or a value is not of its column’s type.


optional unset: readonly OptionalColumnName<S>[]

Defined in: src/actions/wallet/patchEntity.ts:38

Optional columns to remove. Naming one the entity does not carry is not an error — the outcome is the same either way, and a caller clearing a column should not have to know whether it was ever set.

If a name also appears in set.