AshClickhouse.Query (AshClickhouse v0.1.0)

Copy Markdown View Source

Represents a pending ClickHouse query built from Ash query expressions.

The struct is passed through the query pipeline and converted to SQL at execution time. AshClickhouse.DataLayer and AshClickhouse.DataLayer.QueryBuilder operate on %AshClickhouse.Query{}.

Summary

Functions

Creates a new query from just a resource (repo resolved from DSL).

Creates a new query from a resource and repo.

Types

t()

@type t() :: %AshClickhouse.Query{
  aggregates: [map()],
  context: map(),
  database: String.t() | nil,
  distinct: [atom()] | nil,
  filters: list(),
  group_by: [atom()] | nil,
  limit: pos_integer() | nil,
  offset: non_neg_integer() | nil,
  repo: module() | nil,
  resource: Ash.Resource.t(),
  select: [atom()] | nil,
  sorts: list(),
  table: String.t() | nil,
  tenant: term()
}

Functions

new(resource)

@spec new(module()) :: t()

Creates a new query from just a resource (repo resolved from DSL).

new(resource, repo)

@spec new(module(), module()) :: t()

Creates a new query from a resource and repo.