View Source ClickHouse.Format behaviour (ClickHouse v0.30.2)

A behaviour to implement encoding and decoding of ClickHouse queries and results.

Link to this section Summary

Types

A ClickHouse format name.

t()

Input and output formats from ClickHouse.

Callbacks

A callback to decode columns and rows with the format.

A callback to build iodata for the given types and rows.

A callback to return the names used for the format.

Link to this section Types

@type name() :: binary()

A ClickHouse format name.

@type t() :: module()

Input and output formats from ClickHouse.

Link to this section Callbacks

@callback decode(raw :: iodata()) ::
  {ClickHouse.Result.columns(), ClickHouse.Result.rows()}

A callback to decode columns and rows with the format.

Link to this callback

encode(data_types, rows)

View Source
@callback encode(ClickHouse.data_types(), rows :: list()) :: iodata()

A callback to build iodata for the given types and rows.

@callback names() :: [name()]

A callback to return the names used for the format.