ClickHouse (ClickHouse v0.16.0) View Source
A ClickHouse client.
This currently represents an early work in progress.
Link to this section Summary
Types
A ClickHouse client.
Various representations of ClickHouse-related errors.
Parameters used with queries.
Options used for child_spec/1
and start_link/1
A query statement.
A function used to handle stream chunks.
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.
Creates a new query stream using a ClickHouse client.
Link to this section Types
Specs
client() :: atom() | ClickHouse.Client.t()
A ClickHouse client.
Specs
error() :: ClickHouse.ConnectionError.t() | ClickHouse.CoordinationError.t() | ClickHouse.DatabaseError.t() | ClickHouse.NetworkError.t() | ClickHouse.ParsingError.t() | ClickHouse.ResultStreamError.t()
Various representations of ClickHouse-related errors.
Specs
params() :: list()
Parameters used with queries.
Specs
start_option() :: {:name, atom()} | {:interface, ClickHouse.Interface.t()} | {:formats, [ClickHouse.Format.t()]}
Options used for child_spec/1
and start_link/1
Specs
A query statement.
Specs
stream_handler() :: (ClickHouse.ResultStreamChunk.t() -> any())
A function used to handle stream chunks.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
execute(client(), ClickHouse.Query.t(), opts :: keyword()) :: {:ok, ClickHouse.Result.t()} | {:error, error()}
Executes a query using a ClickHouse client.
Specs
prepare(client(), statement(), params()) :: 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([start_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.
Specs
stream(client(), statement(), params(), stream_handler(), opts :: keyword()) :: Enumerable.t()
Creates a new query stream using a ClickHouse client.