Pure invalidation decisions: which registered queries must re-run given the events a transaction produced.
This is the posh datom-matcher's analogue and the cheap check the engine runs before re-executing anything. Events arrive per row with per-row changed columns (already name-resolved); coalesce merges them per table; affected? applies the rules:
All names must already be normalised (sqldeps/norm-name).
Pure invalidation decisions: which registered queries must re-run given the events a transaction produced. This is the posh datom-matcher's analogue and the cheap check the engine runs before re-executing anything. Events arrive per row with per-row changed columns (already name-resolved); coalesce merges them per table; affected? applies the rules: - :all dependencies always re-run; - a table not in the query's tables never re-runs it; - inserted or deleted rows re-run every query on the table (a new row appears in results regardless of which columns it set); - a coarse event (unknown columns) re-runs everything on the table; - a wildcard over the table re-runs on any change to it; - otherwise when a changed column is among the columns bound to that table (alias-qualified or single-table references), or among the query's scope-unbound columns (bare references in multi-table scopes). All names must already be normalised (sqldeps/norm-name).
(affected events deps-by-id)Ids of the queries whose deps any of the coalesced events hit.
Ids of the queries whose deps any of the coalesced events hit.
(affected? {:keys [table changed-cols rows-inserted rows-deleted]} deps)True when a coalesced event for one table invalidates a query with the given dependency profile.
True when a coalesced event for one table invalidates a query with the given dependency profile.
(changed-cols {:keys [op old new]} col-names)Column names a raw positional event actually changed, given the table's declared names - the off-writer half of preupdate event materialization (names cannot be resolved inside the hook; asking sqlite means preparing a statement). Updates keep only differing positions; inserts and deletes report every column.
Column names a raw positional event actually changed, given the table's declared names - the off-writer half of preupdate event materialization (names cannot be resolved inside the hook; asking sqlite means preparing a statement). Updates keep only differing positions; inserts and deletes report every column.
(coalesce events)Merge per-row events into one event per table.
Merge per-row events into one event per table.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |