clickhousex v0.1.0 Clickhousex View Source

Clickhouse driver for Elixir.

This module handles the connection to Clickhouse, providing support for queries, connection backoff, logging, pooling and more.

Link to this section Summary

Types

A connection process name, pid or reference

Functions

Connect to ClickHouse using ODBC. opts expects a keyword list with zero or more of:

* `:driver` - The driver the adapter will use.
    * default value: value of environment variable `CLICKHOUSE_ODBC_DRIVER`
* `:hostname` - The server hostname.
    * default value: localhost
* `:port` - The server port number.
    * default value: 8123
* `:database` - The name of the database.
    * default value: `default`
* `:username` - Username.
    * default value: empty
* `:password` - User's password.
    * default value: empty

Link to this section Types

A connection process name, pid or reference.

A connection reference is used when making multiple requests to the same connection, see transaction/3.

Link to this section Functions

Link to this function query(conn, statement, params, opts \\ []) View Source
query(pid(), binary(), list(), Keyword.t()) :: {:ok, iodata(), Clickhousex.Result.t()}
Link to this function query!(conn, statement, params, opts \\ []) View Source
query!(pid(), binary(), list(), Keyword.t()) :: {iodata(), Clickhousex.Result.t()}
Link to this function start_link(opts) View Source
start_link(Keyword.t()) :: {:ok, pid()} | {:error, term()}

Connect to ClickHouse using ODBC. opts expects a keyword list with zero or more of:

* `:driver` - The driver the adapter will use.
    * default value: value of environment variable `CLICKHOUSE_ODBC_DRIVER`
* `:hostname` - The server hostname.
    * default value: localhost
* `:port` - The server port number.
    * default value: 8123
* `:database` - The name of the database.
    * default value: `default`
* `:username` - Username.
    * default value: empty
* `:password` - User's password.
    * default value: empty