Rindle docs and package mapSkip to main content

assembled_snapshot_to_json

Function assembled_snapshot_to_json 

Source
pub fn assembled_snapshot_to_json(
    changes: &[CaughtChange],
    schema: &Schema,
) -> Value
Expand description

Render a query’s assembled view snapshot — the Add hydration changes (Graph::hydrate_change_sink) read for the SSR one-shot — to the flat, already-joined wire shape (SSR-DESIGN.md §3.3). Unlike the normalized per-table ops, the view is handed back constructed: each result node is { cols, <rel>: [..] }, with relationships nested inline by name, so a stateless API server (which runs no IVM engine) can use it directly. Cells are keyed by column name and honor the query’s projection; .one() levels surface as a single object (or null); scalar-projected relationship aggregates (countAs) surface as a single scalar field.