ClickHouse (ClickHouse v0.12.0) View Source
A ClickHouse client.
This currently represents an early work in progress.
Link to this section Summary
Types
The client identifier.
Various representations of ClickHouse-related errors.
Options used for child_spec/1
and start_link/1
Parameters used with queries.
A query statement.
Functions
Returns a specification to start this module under a supervisor.
Executes a query using a ClickHouse client.
Prepares a query for a ClickHouse client.
Prepares and executes a query using a ClickHouse client.
Starts a ClickHouse client.
Link to this section Types
Specs
client() :: atom()
The client identifier.
Specs
error() :: ClickHouse.ConnectionError.t() | ClickHouse.CoordinationError.t() | ClickHouse.DatabaseError.t() | ClickHouse.NetworkError.t() | ClickHouse.ParsingError.t()
Various representations of ClickHouse-related errors.
Specs
option() :: {:name, client()} | {:interface, ClickHouse.Interface.t()} | {:formats, [ClickHouse.Format.t()]}
Options used for child_spec/1
and start_link/1
Specs
params() :: list()
Parameters used with queries.
Specs
statement() :: binary()
A query statement.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
execute(ClickHouse.Query.t()) :: {:ok, ClickHouse.Result.t()} | {:error, error()}
Executes a query using a ClickHouse client.
Specs
prepare(client(), statement(), params(), keyword()) :: ClickHouse.Query.t()
Prepares a query for a ClickHouse client.
Specs
query(client(), statement(), params(), keyword()) :: {:ok, ClickHouse.Result.t()} | {:error, error()}
Prepares and executes a query using a ClickHouse client.
Specs
start_link([option()]) :: Supervisor.on_start()
Starts a ClickHouse client.
Options
:name
- The name of the client - defaults to:default
.:interface
- The network interface to use for queries - defaults toClickHouse.Interface.HTTP
.:formats
- A list of formats available for encoding/decoding.
Extra Options
Any additional options passed will be given to the client interface.