Rules::Maintainer
The generic maintainer: one algorithm that keeps every view's stored rows equal to its membership query.
Writes are raw SQL (bypassing the ORM) and wrapped in a transaction, so a collection is never observably a transient superset of its query.
Constants
Notifications produced imperatively. The batch reconcile leaves these untouched.
Instance methods
Classifies a relationship type by who maintains it, partitioning the
maintained-collection space so the batch reconcile never destroys a
row it does not own:
:registry-- a registered view; the batch reconcile owns it.:imperative-- a producer-written event record; left untouched.:error-- neither.
Rebuilds a view's stored rows to exactly equal its membership query.
Returns true if any rows changed, false otherwise.
Re-evaluates one key to an insert, delete, reposition, or no-op.
Fired after a base fact changes. Returns true if any rows
changed, false otherwise.
Re-evaluates every registered view for a changed object, projecting the object to each view's affected key(s).
Returns the (view, owner) pairs that changed.