AshOnetime.Resource.ContextBoundary (ash_onetime v1.9.2)

Copy Markdown View Source

The normalized context-boundary declaration produced by the context_boundary section.

A resource that declares context_boundary opts into conditional-append semantics backed by the named append-only fact table. AshOnetime.Boundary.read/3 returns the facts a query matches plus the cutoff they were read at, and AshOnetime.Boundary.append_if/5 appends new facts only when no fact matching the same query has a seq above that cutoff. Read the declaration back with AshOnetime.Resource.Info.context_boundary/1.

Summary

Functions

Validates a fact-table name: a lowercase SQL identifier of at most 48 bytes (letters, digits, underscore, starting with a letter) without the reserved ash_onetime_ prefix. The DSL section's transformer and the migration generator both call this, so the two cannot drift.

Types

t()

@type t() :: %AshOnetime.Resource.ContextBoundary{
  __spark_metadata__: Spark.Dsl.Entity.spark_meta() | nil,
  fact_table: binary()
}

Functions

validate_fact_table(name)

Validates a fact-table name: a lowercase SQL identifier of at most 48 bytes (letters, digits, underscore, starting with a letter) without the reserved ash_onetime_ prefix. The DSL section's transformer and the migration generator both call this, so the two cannot drift.