pub enum DbError {
Show 27 variants
Sql(Error),
Engine(Error),
Streaming(StreamingError),
DataFusion(DataFusionError),
SourceNotFound(String),
SinkNotFound(String),
QueryNotFound(String),
SourceAlreadyExists(String),
SinkAlreadyExists(String),
StreamNotFound(String),
StreamAlreadyExists(String),
TableNotFound(String),
TableAlreadyExists(String),
InsertError(String),
SchemaMismatch(String),
InvalidOperation(String),
SqlParse(ParseError),
Shutdown,
Checkpoint(String),
UnresolvedConfigVar(String),
Connector(String),
Pipeline(String),
QueryPipeline {
context: String,
translated: String,
},
MaterializedView(String),
Storage(String),
Config(String),
Unsupported(String),
}Expand description
Errors from database operations.
Variants§
Sql(Error)
SQL parse error
Engine(Error)
Core engine error
Streaming(StreamingError)
Streaming API error
DataFusion(DataFusionError)
DataFusion error (translated to user-friendly messages on display)
SourceNotFound(String)
Source not found
SinkNotFound(String)
Sink not found
QueryNotFound(String)
Query not found
SourceAlreadyExists(String)
Source already exists
SinkAlreadyExists(String)
Sink already exists
StreamNotFound(String)
Stream not found
StreamAlreadyExists(String)
Stream already exists
TableNotFound(String)
Table not found
TableAlreadyExists(String)
Table already exists
InsertError(String)
Insert error
SchemaMismatch(String)
Schema mismatch between Rust type and SQL definition
InvalidOperation(String)
Invalid SQL statement for the operation
SqlParse(ParseError)
SQL parse error (from streaming parser)
Shutdown
Database is shut down
Checkpoint(String)
Checkpoint error
UnresolvedConfigVar(String)
Unresolved config variable
Connector(String)
Connector error
Pipeline(String)
Pipeline error (start/shutdown lifecycle)
QueryPipeline
Query pipeline error — wraps a DataFusion error with stream context.
Unlike Pipeline, this variant is translated to user-friendly messages.
Fields
MaterializedView(String)
Materialized view error
Storage(String)
Storage backend error.
Config(String)
Configuration / profile validation error
Unsupported(String)
Operation is not yet implemented.
Implementations§
Source§impl DbError
impl DbError
Sourcepub fn query_pipeline(
context: impl Into<String>,
df_error: &DataFusionError,
) -> Self
pub fn query_pipeline( context: impl Into<String>, df_error: &DataFusionError, ) -> Self
Create a QueryPipeline error from a DataFusion error with stream context.
The DataFusion error is translated to a user-friendly message with
structured error codes. The raw DataFusion internals are never exposed.
Sourcepub fn query_pipeline_with_columns(
context: impl Into<String>,
df_error: &DataFusionError,
available_columns: &[&str],
) -> Self
pub fn query_pipeline_with_columns( context: impl Into<String>, df_error: &DataFusionError, available_columns: &[&str], ) -> Self
Create a QueryPipeline error from a DataFusion error with stream
context and available column names for typo suggestions.
Sourcepub fn query_pipeline_arrow(
context: impl Into<String>,
arrow_error: &ArrowError,
) -> Self
pub fn query_pipeline_arrow( context: impl Into<String>, arrow_error: &ArrowError, ) -> Self
Create a QueryPipeline error from an Arrow error with stream context.
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Returns the structured LDB-NNNN error code for this error.
Every DbError variant maps to a stable error code that can be used
for programmatic handling, log searching, and metrics.
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Whether this error is transient (retryable).
Trait Implementations§
Source§impl Error for DbError
impl Error for DbError
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<DataFusionError> for DbError
impl From<DataFusionError> for DbError
Source§fn from(source: DataFusionError) -> Self
fn from(source: DataFusionError) -> Self
Source§impl From<ParseError> for DbError
impl From<ParseError> for DbError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<StreamingError> for DbError
impl From<StreamingError> for DbError
Source§fn from(source: StreamingError) -> Self
fn from(source: StreamingError) -> Self
Auto Trait Implementations§
impl Freeze for DbError
impl !RefUnwindSafe for DbError
impl Send for DbError
impl Sync for DbError
impl Unpin for DbError
impl UnsafeUnpin for DbError
impl !UnwindSafe for DbError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> 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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.