ReactiveDag.Node.Recompute.Read (reactive_dag v0.17.0-rc)

Copy Markdown View Source

Executes a combinator's READ — always an Ash read of the over node's resource (its primary read action, or the :read action read: names), shaped by the optional query: transformer, and ALWAYS scoped by the library: when the recompute claimed specific dirty keys, the over's payload key is filtered to them (the transformer cannot un-scope; scoping is the substrate's correctness concern, not policy).

The over node's resource is a cross-node fact stamped into cell.meta.over_source at graph assembly (ReactiveDag.Node.graph/2); a cell built via to_cell/1 alone has no stamp and raises here with guidance.

Summary

Functions

The over node's items: source is cell.meta[:over_source] (or nil), query_fn the combinator's query: (or nil), claimed the claimed dirty keys or nil for whole-cell (what query: receives), and auto_scope the keys the LIBRARY filters the over's payload key to — the claimed keys under key_rule :identity (this cell's keys ARE the over's), nil otherwise (a grain-changing rule's parent-grain keys must not filter the child-grain read; the host scopes at its own grain through query:).

Functions

items(source, over, query_fn, claimed, auto_scope)

@spec items(
  map() | nil,
  atom(),
  (Ash.Query.t(), [String.t()] | nil -> Ash.Query.t()) | nil,
  [String.t()] | nil,
  [String.t()] | nil
) :: [term()]

The over node's items: source is cell.meta[:over_source] (or nil), query_fn the combinator's query: (or nil), claimed the claimed dirty keys or nil for whole-cell (what query: receives), and auto_scope the keys the LIBRARY filters the over's payload key to — the claimed keys under key_rule :identity (this cell's keys ARE the over's), nil otherwise (a grain-changing rule's parent-grain keys must not filter the child-grain read; the host scopes at its own grain through query:).