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.
Example
Section titled “Example”{ set: { title: "Cells, not entities", score: dec("4.2") }, unset: ["thumbnail"] }Type Parameters
Section titled “Type Parameters”The schema the changes are typed by.
Properties
Section titled “Properties”
optionalset: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.
Throws
Section titled “Throws”If a name is not a column, or a value is not of its column’s type.
unset?
Section titled “unset?”
optionalunset: readonlyOptionalColumnName<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.
Throws
Section titled “Throws”If a name also appears in set.