The configured explicit PRIMARY KEY columns.
DSL extensions for configuring ClickHouse-specific options on Ash resources.
Usage
defmodule MyApp.MyResource do
use Ash.Resource,
data_layer: AshClickhouse.DataLayer
clickhouse do
table "my_table"
repo MyApp.Repo
database "my_app_dev"
base_filter [status: "active"]
default_context %{tenant: "org_123"}
description "My resource description"
engine "MergeTree()"
order_by "id"
partition_by "toYYYYMM(inserted_at)"
settings "index_granularity = 8192"
end
attributes do
uuid_primary_key :id
attribute :name, :string
end
endOptions
:table— the table name in ClickHouse (overrides the default):repo— theAshClickhouse.Repomodule to use:database— the database to use (overrides repo default):engine— the ClickHouse table engine (default"MergeTree()"):order_by—ORDER BYexpression for the table engine:partition_by—PARTITION BYexpression for the table engine:primary_key— explicit primary key columns (ClickHousePRIMARY KEY):settings— engine settings string:base_filter— a filter applied to all queries on this resource:default_context— context merged into every query/changeset:description— human-readable description of the resource:migrate— whether this resource is included in migrations (defaulttrue)
Summary
Functions
The configured base_filter.
Macro for configuring ClickHouse options in Ash resources.
The configured database (overrides repo default).
The configured default_context.
The configured description.
The configured table engine.
Whether this resource is included in migrations (default true).
The configured ORDER BY expression.
The configured PARTITION BY expression.
The configured explicit PRIMARY KEY columns.
The configured repo module.
The configured engine settings string.
The configured table name.
Functions
The configured base_filter.
Macro for configuring ClickHouse options in Ash resources.
The configured database (overrides repo default).
The configured default_context.
The configured description.
The configured table engine.
Whether this resource is included in migrations (default true).
The configured ORDER BY expression.
The configured PARTITION BY expression.
The configured repo module.
The configured engine settings string.
The configured table name.