pub enum StoreColumnType {
Show 15 variants
Uuid,
Text,
Int,
BigInt,
Float,
Double,
Bool,
Timestamptz,
Timestamp,
Date,
Time,
Jsonb,
Json,
Bytea,
Numeric,
}Expand description
The closed column-type catalog an axonstore may declare a column
as. Mirrors the v1.30.0 [crate::ir_nodes::IRStoreColumnType]
surface and the Postgres runtime’s PgTypeClass (in
axon-rs/src/store/postgres_backend.rs) one-for-one.
Source-level surface accepts both the canonical PascalCase name
AND a small set of common lowercase aliases (int for Int,
boolean for Bool, integer for Int, …) — see
StoreColumnType::from_token. The AST always carries the
canonical PascalCase variant; the alias is normalized at parse
time.
A column whose declared type is OUTSIDE this catalog is a parse
error at axon check time with a precise message + Levenshtein
suggestions. The honest-scope boundary is named: Postgres types
outside the catalog — enum, domain, array, citext, PostGIS
geometry, custom composites — remain UnsupportedColumnType,
tracked for the v1.31.0+ “broaden the catalog” follow-on.
Variants§
Implementations§
Source§impl StoreColumnType
impl StoreColumnType
Sourcepub const ALL: &'static [StoreColumnType]
pub const ALL: &'static [StoreColumnType]
The closed catalog, in canonical declaration order — useful for exhaustive iteration in tests + the smart-suggest dictionary.
Sourcepub fn canonical_name(self) -> &'static str
pub fn canonical_name(self) -> &'static str
The canonical PascalCase declaration name — exactly what an adopter writes in source and exactly what the IR / manifest serializes as. Stable surface — adopters tooling can rely on it.
Sourcepub fn from_token(name: &str) -> Option<StoreColumnType>
pub fn from_token(name: &str) -> Option<StoreColumnType>
Parse a source-level token (an identifier or keyword) into a catalog variant. Accepts the canonical name AND a small set of common aliases — case-insensitive at the level of the alias table to maximise ergonomics, but the AST always carries the canonical variant so the IR is deterministic.
Aliases (D5 ergonomic floor — not load-bearing, not promised in the public contract; the canonical name is the supported form):
int,integer,int4→Intbigint,int8→BigIntbool,boolean→Booltext,varchar,string→Textuuid→Uuidfloat,float4,real→Floatdouble,float8→Doubletimestamptz→Timestamptztimestamp→Timestampdate→Datetime→Timejsonb→Jsonbjson→Jsonbytea→Byteanumeric,decimal→Numeric
Anything else returns None — the parser surfaces it as an
axon-T8xx-class error with the closed-catalog list.
Sourcepub fn all_canonical_names() -> Vec<&'static str>
pub fn all_canonical_names() -> Vec<&'static str>
All canonical names — useful for the smart-suggest dictionary when the parser rejects an unknown type.
Trait Implementations§
Source§impl Clone for StoreColumnType
impl Clone for StoreColumnType
Source§fn clone(&self) -> StoreColumnType
fn clone(&self) -> StoreColumnType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more