Expand description
Statements that return rows.
§A read never persists anything
The session opens with automatic confirmation switched off, so anything a read touched is discarded when the connection closes at the end of the invocation. The guarantee therefore does not depend on the classification being right: even a change that escaped the classifier and travelled here would leave nothing behind. There is no flag that switches this off.
§A row is never held longer than it takes to write it
stream hands each row to the output flow and forgets it, so a million
rows cost the same memory as one and the caller sees the first row while the
server is still sending the last. The output operations run as stages of
that flow, so a ceiling, a filter, a projection or a deduplication no longer
costs the whole set being gathered first. The flow ends with the record that
declares it complete, and a connection that drops mid-way leaves the output
without that record, which is exactly how a cut set is told from a whole one.
collect exists for the answer that travels inside a single envelope,
where the whole set is the payload by definition. It obeys the row ceiling,
and declares a gap when the ceiling cut the answer short.
Structs§
- Read
Result - The rows of one read, together with what the ceiling did to them.
Functions§
- collect
- Runs a read and collects its rows, obeying the ceiling.
- column_
names - The labels the declared columns are carried under, in order.
- convert_
row - Converts one wire row into the shape the output pipeline carries.
- refuse_
if_ not_ a_ read - Refuses a statement asked to be read that does not read.
- sample_
request - Builds the statement that returns the first rows of a table.
- serve
- Runs a read under the ceiling and shapes the payload it answers with.
- stream
- Runs a read and writes each row straight onto the flow.
- with_
ceiling - Imposes this tool’s own row ceiling on a statement that returns rows.