pub struct StoreColumn {
pub name: String,
pub col_type: StoreColumnType,
pub primary_key: bool,
pub auto_increment: bool,
pub not_null: bool,
pub unique: bool,
pub default_value: String,
pub identity: bool,
pub indexed: bool,
pub json_shape: Option<String>,
pub line: u32,
pub column: u32,
}Expand description
One column entry in an inline schema { col: Type [constraint…], … }
block.
The closed-set constraint vocabulary is shared with the Python AST
(StoreColumnNode): primary_key, auto_increment, not_null,
unique, default <literal>.
Fields§
§name: String§col_type: StoreColumnType§primary_key: bool§auto_increment: bool§not_null: bool§unique: bool§default_value: StringLiteral default value, source-text verbatim. The runtime does
not interpolate; the database supplies the default. Empty when
no default … constraint is declared.
identity: boolv1.31.0 (D2) — true iff this column is declared with
GENERATED ALWAYS AS IDENTITY or GENERATED BY DEFAULT AS IDENTITY in the live database (pg_attribute.attidentity is
'a' or 'd'). Distinct from auto_increment (which marks
the legacy SERIAL pattern via a nextval(...) default
expression). T803 treats an identity column as safe-to-omit
from a persist because Postgres auto-fills it.
Backwards-compatibility (D5): the field defaults to false,
matching v1.38.2 behavior for every column. A manifest written
against v1.38.2 round-trips byte-identically.
indexed: boolv2.26.0 (D1) — true iff the column is declared with the
index constraint, e.g. payload: Json index. This is the
program-visible declaration of an index as a CAPABILITY-HONEST
EFFECT: the index is part of the source the deploy gate sees, never
a silent out-of-band DBA action (doctrine: infrastructure is
visible to the program). The index METHOD is chosen by the backend
from the column type — a Json/Jsonb column gets a Postgres GIN
path index (USING gin (col jsonb_path_ops)), any other column a
plain b-tree. Defaults to false — a pre-v2.26.0 manifest round-trips
byte-identically.
json_shape: Option<String>v2.26.0 (D1) — the OPTIONAL shape LENS on a Json / Jsonb
column: payload: Json<UserEvent> records Some("UserEvent"),
a bare payload: Json records None. The lens is a COMPILE-TIME
expectation only — the column’s physical type stays jsonb and
the runtime navigates it totally regardless (a declared-but-absent
field degrades to null, never crashes; doctrine
open_data_is_total). The type-checker validates that the named
shape is a declared struct type (axon-T840); the parser
rejects a <T> on any non-Json column type (axon-T841). Only
ever Some(_) for StoreColumnType::{Json, Jsonb}. Defaults to
None — a v1.38–1.23 manifest round-trips byte-identically.
line: u32§column: u32Trait Implementations§
Source§impl Clone for StoreColumn
impl Clone for StoreColumn
Source§fn clone(&self) -> StoreColumn
fn clone(&self) -> StoreColumn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more