pub enum StoreColumnSchema {
Inline {
columns: Vec<StoreColumn>,
leading_trivia: Vec<Trivia>,
line: u32,
column: u32,
},
ManifestRef {
qualified_name: String,
line: u32,
column: u32,
},
EnvVar {
var_name: String,
line: u32,
column: u32,
},
}Expand description
v1.31.0 (D1) — the three closed forms an axonstore may declare
its column schema in. The AST captures the form; the v1.31.0 / v1.31.0
StoreColumnProof pass consumes the resolved column set (regardless
of form) and proves every store reference against it.
pub so consumers (the type-checker, the runtime registry, the LSP)
can match exhaustively. Variants are #[non_exhaustive]-style only
at the doc level — additions go through a plan ratification per the
founder discipline.
Variants§
Inline
Form (a) — schema { col: Type [constraint…], … }.
Fields
columns: Vec<StoreColumn>ManifestRef
Form (b) — schema: "qualified.name". The qualified name
resolves against a checked-in manifest entry (.axon-schema.yml
/ .axon-schema.json) at axon check time.
EnvVar
Form (c) — schema: env:VAR (or quoted schema: "env:VAR").
The env-var resolves to the schema NAMESPACE at deploy time;
the manifest then provides the column set for <namespace>.<table>.
Implementations§
Source§impl StoreColumnSchema
impl StoreColumnSchema
Sourcepub fn is_inline(&self) -> bool
pub fn is_inline(&self) -> bool
true iff this is the inline form. Convenience for the
v1.31.0 / v1.31.0 type-checker, which can short-circuit a manifest
lookup when the columns are already in the AST.
Sourcepub fn inline_columns(&self) -> Option<&[StoreColumn]>
pub fn inline_columns(&self) -> Option<&[StoreColumn]>
Returns the inline columns when the form is inline; None
otherwise. The type-checker uses this to obtain the column
set without a manifest round-trip.
Trait Implementations§
Source§impl Clone for StoreColumnSchema
impl Clone for StoreColumnSchema
Source§fn clone(&self) -> StoreColumnSchema
fn clone(&self) -> StoreColumnSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more