Applies the constraint to an update being applied to the data. If the
update would cause a violation, this method must mutate the given update
using its assert
method, to resolve the violation.
a read-only view of data from the clone prior to the update
the interim update, prior to application to the data
a rejection only if the constraint application fails
Check the given update does not violate this constraint.
a read-only view of data from the clone prior to the update
the interim update, prior to application to the data
a rejection if the constraint is violated (or fails)
Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.8.2 Source code licensed MIT. Privacy policy
A constraint asserts an invariant for data in a clone. When making transactions against the clone, the constraint is 'checked', and violating transactions fail.
Constraints are also 'applied' for incoming updates from other clones. This is because a constraint may be violated as a result of data changes in either clone. In this case, the constraint must resolve the violation by application of some rule.
In this clone engine, constraints are checked and applied for updates prior to their application to the data (the updates are 'interim'). If the constraint requires to know the final state, it must infer it from the given reader and the update.
m-ld concurrency