AshAge.DataLayer.Info (AshAge v1.0.0)

Copy Markdown View Source

Info functions for AGE data layer configuration.

Reads all values dynamically from the resource's age do ... end DSL block via Spark.Dsl.Extension. No hard-coded defaults — the DSL schema enforces required options.

Summary

Functions

Gets the attribute map for a resource (name → graph property name).

Gets the attribute type specs for a resource (name → {type, constraints}).

Gets the configured edge entities for a resource.

Gets the graph name for a resource.

Gets the label for a resource.

Gets the repo for a resource.

Gets the RLS GUC name for a resource, or nil (RLS not enabled).

Gets the sensitive-classified attribute names (default []).

Gets attributes to skip.

Gets the tenant_graph MFA override for a resource, or nil.

Functions

attribute_map(resource)

@spec attribute_map(Ash.Resource.t()) :: %{required(atom()) => String.t()}

Gets the attribute map for a resource (name → graph property name).

attribute_types(resource)

@spec attribute_types(Ash.Resource.t()) :: %{
  required(atom()) => {Ash.Type.t(), keyword()}
}

Gets the attribute type specs for a resource (name → {type, constraints}).

Carries constraints so every wire path (AshAge.Type.Cast.serialize_value, coerce_value/2) resolves storage classes with the SAME inputs the verifiers and range/sort gates use (Ash.Type.storage_type/2) — a type whose storage class depends on constraints must never verify one way and encode another.

edges(resource)

@spec edges(Ash.Resource.t()) :: [struct()]

Gets the configured edge entities for a resource.

graph(resource)

@spec graph(Ash.Resource.t()) :: atom() | nil

Gets the graph name for a resource.

label(resource)

@spec label(Ash.Resource.t()) :: atom() | String.t()

Gets the label for a resource.

repo(resource)

@spec repo(Ash.Resource.t()) :: module() | nil

Gets the repo for a resource.

rls_guc(resource)

@spec rls_guc(Ash.Resource.t()) :: String.t() | nil

Gets the RLS GUC name for a resource, or nil (RLS not enabled).

sensitive(resource)

@spec sensitive(Ash.Resource.t()) :: [atom()]

Gets the sensitive-classified attribute names (default []).

skip(resource)

@spec skip(Ash.Resource.t()) :: [atom()]

Gets attributes to skip.

tenant_graph(resource)

@spec tenant_graph(Ash.Resource.t()) :: {module(), atom(), list()} | nil

Gets the tenant_graph MFA override for a resource, or nil.