Clickhouse (Clickhouse v0.2.2) View Source

A Clickhouse client.

This currently represents an early work in progress.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Executes a query using a Clickhouse client.

Starts a Clickhouse client.

Link to this section Types

Specs

client() :: atom()

Specs

format() :: module()

Specs

interface() :: module()

Specs

option() ::
  {:client, client()} | {:interface, interface()} | {:interface_opts, keyword()}

Specs

options() :: [option()]

Specs

params() :: list()

Specs

statement() :: binary()

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

query(client, statement, params \\ [], opts \\ [])

View Source

Specs

query(client(), statement(), params(), keyword()) ::
  {:ok, Clickhouse.Result.t()} | {:error, Clichouse.Error.t()}

Executes a query using a Clickhouse client.

Specs

start_link(options()) :: Supervisor.on_start()

Starts a Clickhouse client.

Options

  • :client - The name of the client - defaults to :default.
  • :interface - The interface to use for queries - defaults to Clickhouse.Interface.HTTP.
  • :interface_opts - Additional keyword options to pass to the interface.