Huginn.Clickhouse.Result (Huginn v0.4.0)
View SourceParses and transforms ClickHouse gRPC Result messages.
Summary
Functions
Converts a gRPC Result message to a Huginn.Clickhouse.Result struct.
Merges multiple results from streaming responses.
Parses raw output bytes based on format.
Converts rows to a list of maps using column names as keys.
Types
@type log_entry() :: %{ time: non_neg_integer(), level: atom(), source: String.t(), text: String.t() }
@type progress() :: %{ read_rows: non_neg_integer(), read_bytes: non_neg_integer(), total_rows_to_read: non_neg_integer(), written_rows: non_neg_integer(), written_bytes: non_neg_integer() }
@type stats() :: %{ rows: non_neg_integer(), blocks: non_neg_integer(), allocated_bytes: non_neg_integer(), rows_before_limit: non_neg_integer() }
Functions
Converts a gRPC Result message to a Huginn.Clickhouse.Result struct.
Merges multiple results from streaming responses.
Parses raw output bytes based on format.
columns is the list of column/0 maps parsed from the gRPC result. It is
only consulted for JSONEachRow, where JSON object key order is not
guaranteed to match the column order — values are extracted in column order so
rows line up with columns. When columns is empty (the default, and the
case for the 2-arity form), JSONEachRow falls back to the order returned by
Jason.
Converts rows to a list of maps using column names as keys.