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 Fase 38+ “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 moreimpl Copy for StoreColumnType
Source§impl Debug for StoreColumnType
impl Debug for StoreColumnType
Source§impl Display for StoreColumnType
impl Display for StoreColumnType
impl Eq for StoreColumnType
Source§impl Hash for StoreColumnType
impl Hash for StoreColumnType
Source§impl PartialEq for StoreColumnType
impl PartialEq for StoreColumnType
Source§fn eq(&self, other: &StoreColumnType) -> bool
fn eq(&self, other: &StoreColumnType) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoreColumnType
Auto Trait Implementations§
impl Freeze for StoreColumnType
impl RefUnwindSafe for StoreColumnType
impl Send for StoreColumnType
impl Sync for StoreColumnType
impl Unpin for StoreColumnType
impl UnsafeUnpin for StoreColumnType
impl UnwindSafe for StoreColumnType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more