Configuration module for AshClickhouse.
Define a repo in your application and add it to your supervision tree:
defmodule MyApp.Repo do
use AshClickhouse.Repo, otp_app: :my_app
endThen configure it in config/config.exs:
config :my_app, MyApp.Repo,
url: "http://localhost:8123",
database: "my_app_dev"Options
:url— ClickHouse HTTP URL (default"http://localhost:8123"):username/:password— credentials (default"default"/""):database— default database name:pool_size— size of the connection pool (default10):ipv4_only— resolve the URL host to an IPv4 address and connect to that literal IP (defaultfalse). Set totruewhen the DNS server returnsNXDOMAINfor AAAA queries, which otherwise surfaces as aClickHouse.ConnectionErrorwith message"nxdomain".
Summary
Functions
Converts repo config to ClickHouse connection options.
Types
@type config() :: keyword()
Callbacks
@callback child_spec(keyword()) :: Supervisor.child_spec()
@callback config() :: keyword()
@callback connection() :: AshClickhouse.Connection.t() | nil
@callback database() :: String.t() | nil
@callback otp_app() :: atom() | nil