Runs a pure-Ash-query aggregate node: the datastore groups + aggregates the
node's over relationship in ONE query (a relationship aggregate — Postgres does
the GROUP BY), and each parent row's aggregate values become its payload.
The node's resource is the group's own resource — ONE row per group, aggregating
the finer rows reached through over. The runner:
- reads that resource with the relationship aggregates loaded under temporary
names (
Ash.Query.aggregate(q, tmp, kind, over, field: src)), - for each row, projects the loaded aggregates onto the resource's own
attributes (the
destin each mapping), upserts the row (viaReactiveDag.Node.Payload), andOp.puts the changed keys.
It is a WHOLE-CELL recompute: a GROUP BY reprices every group, so the changed
set is every group whose aggregate value actually moved (Payload's change-
detection filters the no-ops).
Summary
Functions
Recompute an aggregate node; returns the changed keys.
Functions
@spec recompute(ReactiveDag.Cell.t(), module(), map()) :: [String.t()]
Recompute an aggregate node; returns the changed keys.