pub enum StoreError {
Show 17 variants
EmptyConnection,
EmptyEnvVarName,
MissingEnvVar {
var: String,
},
PoolInit {
dsn_masked: String,
source: String,
},
InvalidIdentifier {
kind: &'static str,
name: String,
},
EmptyData {
op: &'static str,
},
Filter(FilterError),
Epistemic(EpistemicError),
Connect {
source: String,
},
Query {
op: &'static str,
source: String,
},
UnsupportedColumnType {
column: String,
pg_type: String,
},
Decode {
column: String,
pg_type: String,
source: String,
},
TableNotResolved {
table: String,
},
AmbiguousTable {
table: String,
schemas: Vec<String>,
},
SchemaDrift {
op: &'static str,
sqlstate: String,
source: String,
},
MissingPerTenantSchemaEnv {
store: String,
var: String,
},
DeclaredVsLiveDrift {
store: String,
drift: String,
},
}Expand description
Every way an axonstore SQL operation can fail. The backend is
total: it returns one of these or a result — never a panic, never a
silent empty result masking a failure.
Variants§
EmptyConnection
connection was empty or whitespace-only.
EmptyEnvVarName
connection was the bare prefix env: with no variable name.
MissingEnvVar
connection: "env:VAR" and VAR is unset (or not UTF-8).
PoolInit
The resolved DSN is malformed — connect_lazy rejected it.
InvalidIdentifier
A table or column identifier failed the [A-Za-z_]\w* / 63-byte
safety check (D4 — no untrusted identifier reaches SQL).
EmptyData
insert / mutate was called with no column data.
Filter(FilterError)
The where expression did not compile (delegates to 35.b).
Epistemic(EpistemicError)
A confidence_floor violation — a sub-floor or un-elevated
persist (delegates to 35.g’s Pillar I epistemic data plane).
Connect
A live connection could not be acquired / the ping failed.
Query
A SQL statement failed at execution time.
UnsupportedColumnType
A retrieved column has a type outside the supported catalog
(classify_pg_type). Honest scope, not a silent miss.
Decode
A retrieved column of a supported type failed to decode.
TableNotResolved
§Fase 37.x.b (D1) — the table named by a store operation could not be resolved to a relation in ANY schema of the database.
AmbiguousTable
§Fase 37.x.b (D1) — the table name resolves to a relation in
more than one schema and the connection’s search_path does not
disambiguate it. Carries the schemas found, sorted.
SchemaDrift
§Fase 37.x.f (D9) — a store SQL statement failed with a
schema-drift SQLSTATE: the cached schema no longer matches the
live table (an ALTER TABLE ran since the cache was populated).
42P01 undefined_table, 42703 undefined_column, 42804
datatype_mismatch (a stale write cast), 42883 undefined
operator (a stale read cast). Triggers the D9 self-heal — the
(dsn, table) cache entry is evicted and the operation retried
once against fresh introspection. Safe: every one is a
parse/plan-time rejection, so the failed statement had ZERO side
effects (a retried persist/mutate cannot double-write).
MissingPerTenantSchemaEnv
§Fase 38.f (D3) — axon-T806. A postgresql store declared
schema: env:VAR and the named env var is unset at deploy
time. Never falls back silently — the deploy fails, the
operator either exports the var or fixes the declaration.
DeclaredVsLiveDrift
§Fase 38.f (D8 strengthening) — axon-T807. A declared column
schema and the live introspected columns disagree at deploy
time. Carries a human-readable drift summary (which columns
are missing on the live DB, which have a type mismatch). The
remedy is named in the message: run axon store introspect <store> to refresh the manifest, run the missing migration,
or fix the declaration.
Implementations§
Source§impl StoreError
impl StoreError
Sourcepub fn is_schema_drift(&self) -> bool
pub fn is_schema_drift(&self) -> bool
§Fase 37.x.f (D9) — true iff this is a schema-drift failure
(StoreError::SchemaDrift) — the signal that triggers the
(dsn, table) cache self-heal (evict + retry once).
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§fn clone(&self) -> StoreError
fn clone(&self) -> StoreError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<EpistemicError> for StoreError
impl From<EpistemicError> for StoreError
Source§fn from(e: EpistemicError) -> Self
fn from(e: EpistemicError) -> Self
Source§impl From<FilterError> for StoreError
impl From<FilterError> for StoreError
Source§fn from(e: FilterError) -> Self
fn from(e: FilterError) -> Self
Source§impl PartialEq for StoreError
impl PartialEq for StoreError
Source§fn eq(&self, other: &StoreError) -> bool
fn eq(&self, other: &StoreError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoreError
Auto Trait Implementations§
impl Freeze for StoreError
impl RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl UnwindSafe for StoreError
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<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