View Source ClickHouse.Interface.HTTP (ClickHouse v0.30.2)

An interface to interact with a ClickHouse server via HTTP.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Executes a query via HTTP.

Starts the HTTP network interface.

Streams the next results of a query via HTTP.

Starts a query result stream via HTTP.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

execute(client, query, opts \\ [])

View Source
@spec execute(ClickHouse.Client.t(), ClickHouse.Query.t(), keyword()) ::
  {:ok, ClickHouse.Result.t()} | {:error, ClickHouse.error()}

Executes a query via HTTP.

@spec start_link(keyword()) :: GenServer.on_start()

Starts the HTTP network interface.

@spec stream_next(ClickHouse.Stream.t()) ::
  {:cont, ClickHouse.Stream.t()}
  | {:cont, ClickHouse.Stream.t(), iodata()}
  | {:halt, ClickHouse.Stream.t()}
  | {:error, ClickHouse.error()}

Streams the next results of a query via HTTP.

@spec stream_start(ClickHouse.Stream.t()) ::
  {:ok, ClickHouse.Stream.t()} | {:error, ClickHouse.error()}

Starts a query result stream via HTTP.