Introspection for the replicant do ... end AshArcadic.Replicant extension.
Generates the replicant_<option>/1 ({:ok, value} | :error) and
replicant_<option>!/1 accessors for every option, plus the hand-written
helpers below: source_table/1 (the declared value — required, no
reflection fallback), source_schema/1 (declared value, else "public"),
tenant_attribute/1, skip/1, and on_truncate/1.
Summary
Functions
The upstream TRUNCATE policy: :halt (default, fail-closed) or :mirror.
Policy for an upstream TRUNCATE: :halt (fail-closed, default) or :mirror (raw-delete the mirror rows in-txn).
Policy for an upstream TRUNCATE: :halt (fail-closed, default) or :mirror (raw-delete the mirror rows in-txn).
replicant DSL options
Source non-identity columns excluded from the mirror write. Must NOT name the primary key — a dropped PK would forge a fresh vertex identity on every apply, so a skipped PK is rejected at compile by ValidatePrimaryKeyNotSkipped.
Source non-identity columns excluded from the mirror write. Must NOT name the primary key — a dropped PK would forge a fresh vertex identity on every apply, so a skipped PK is rejected at compile by ValidatePrimaryKeyNotSkipped.
Source Postgres schema name.
Source Postgres schema name.
Source Postgres table name. Required — a graph resource's own arcade label is not its Postgres source table, so no reflection fallback is offered.
Source Postgres table name. Required — a graph resource's own arcade label is not its Postgres source table, so no reflection fallback is offered.
Source column carrying the tenant. Resolved per row and passed as tenant: to the mirror action. Requires the source table to be REPLICA IDENTITY FULL: a :delete / PK-changing :update resolves the tenant from old_record, which is key-only under the default replica identity — the tenant column would be absent, so the apply fails closed :tenant_required and halts the whole transaction.
Source column carrying the tenant. Resolved per row and passed as tenant: to the mirror action. Requires the source table to be REPLICA IDENTITY FULL: a :delete / PK-changing :update resolves the tenant from old_record, which is key-only under the default replica identity — the tenant column would be absent, so the apply fails closed :tenant_required and halts the whole transaction.
Source columns excluded from the mirror write, else [] when undeclared.
The source Postgres schema for the resource: the explicit source_schema, else "public".
The source Postgres table for the resource. Required — no reflection fallback.
The source column carrying the tenant, else nil when undeclared.
Functions
@spec on_truncate(Ash.Resource.t()) :: :halt | :mirror
The upstream TRUNCATE policy: :halt (default, fail-closed) or :mirror.
Policy for an upstream TRUNCATE: :halt (fail-closed, default) or :mirror (raw-delete the mirror rows in-txn).
@spec replicant_on_truncate!(dsl_or_extended :: module() | map()) :: (:mirror | :halt) | no_return()
Policy for an upstream TRUNCATE: :halt (fail-closed, default) or :mirror (raw-delete the mirror rows in-txn).
replicant DSL options
Returns a map containing the and any configured or default values.
Source non-identity columns excluded from the mirror write. Must NOT name the primary key — a dropped PK would forge a fresh vertex identity on every apply, so a skipped PK is rejected at compile by ValidatePrimaryKeyNotSkipped.
Source non-identity columns excluded from the mirror write. Must NOT name the primary key — a dropped PK would forge a fresh vertex identity on every apply, so a skipped PK is rejected at compile by ValidatePrimaryKeyNotSkipped.
Source Postgres schema name.
Source Postgres schema name.
Source Postgres table name. Required — a graph resource's own arcade label is not its Postgres source table, so no reflection fallback is offered.
Source Postgres table name. Required — a graph resource's own arcade label is not its Postgres source table, so no reflection fallback is offered.
Source column carrying the tenant. Resolved per row and passed as tenant: to the mirror action. Requires the source table to be REPLICA IDENTITY FULL: a :delete / PK-changing :update resolves the tenant from old_record, which is key-only under the default replica identity — the tenant column would be absent, so the apply fails closed :tenant_required and halts the whole transaction.
Source column carrying the tenant. Resolved per row and passed as tenant: to the mirror action. Requires the source table to be REPLICA IDENTITY FULL: a :delete / PK-changing :update resolves the tenant from old_record, which is key-only under the default replica identity — the tenant column would be absent, so the apply fails closed :tenant_required and halts the whole transaction.
@spec skip(Ash.Resource.t()) :: [atom()]
Source columns excluded from the mirror write, else [] when undeclared.
@spec source_schema(Ash.Resource.t()) :: String.t()
The source Postgres schema for the resource: the explicit source_schema, else "public".
@spec source_table(Ash.Resource.t()) :: String.t()
The source Postgres table for the resource. Required — no reflection fallback.
@spec tenant_attribute(Ash.Resource.t()) :: atom() | nil
The source column carrying the tenant, else nil when undeclared.