ChDriver. Stream
(ch_driver v0.2.0)
Copy Markdown
An Enumerable that streams a query's rows one wire-protocol block at a
time, instead of loading the whole result into memory.
Built by ChDriver.stream/2,3,4 — see its docs for a usage example. All
fields are private.
Cleanup runs whether the consumer takes everything (Enum.to_list/1) or
stops early (Enum.take/2, a break, a raised exception, ...) — the
underlying query gets cancelled properly either way.
Summary
Types
@type t() :: %ChDriver.Stream{ conn: DBConnection.conn(), opts: keyword(), params: list(), query: ChDriver.Query.t() }