Automatic Data Layer Introspection helper for Ash resources.
Extracts physical database storage details (table name, schema, repo, child/parent join columns)
directly from active Ash data layers (such as AshPostgres.DataLayer or Ash.DataLayer.Ets)
to prevent redundant DSL annotations.
Summary
Functions
Identifies which Ash data layer backs a resource: :postgres, :ets, or :unknown.
Infers relationship join child and parent column names from Ash relationship metadata.
Extracts database schema name if configured on data layer.
Extracts physical table name from resource data layer metadata.
Functions
@spec backend(module()) :: :postgres | :ets | :unknown
Identifies which Ash data layer backs a resource: :postgres, :ets, or :unknown.
@spec infer_join_columns(module(), Ash.Resource.Relationships.relationship() | map()) :: {String.t(), String.t()}
Infers relationship join child and parent column names from Ash relationship metadata.
Extracts database schema name if configured on data layer.
Extracts physical table name from resource data layer metadata.