AttrEngine.Schema.AttributeSetAttribute (attr_engine v0.2.1)

Copy Markdown View Source

Join table: links an Attribute to an AttributeSet with semantic identity.

The ASA is where a generic structural primitive (e.g. "text_input") becomes a named field with context (e.g. "title" in one set, "legend" in another).

Config cascade — Layer 2

ASA carries its own data_config and ui_config that override the parent Attribute's defaults. The full cascade:

  1. Attribute.data_config / ui_config (structural defaults)
  2. ASA.data_config / ui_config (semantic overrides) ← this layer
  3. ASD.ui_config (per-instance overrides)
  4. Runtime enrichment (PG functions, transforms)

Key fields

  • handle — the semantic name this attribute takes in this set
  • data_config — type-specific config: %{"type" => "string", "localized" => true}
  • ui_config — presentation overrides: %{"tag" => "h2", "classes" => "..."}
  • sort — position within the set

Summary

Functions

Standard changeset — requires both foreign keys.

Functions

changeset(asa, attrs)

Standard changeset — requires both foreign keys.