pub enum QueryError {
Show 16 variants
ParseError {
message: String,
line: usize,
column: usize,
},
SemanticError(String),
OptimizationError(String),
ExecutionError(String),
TypeMismatch {
expected: String,
actual: String,
},
ColumnNotFound(String),
TableNotFound(String),
FunctionNotFound(String),
InvalidArgument(String),
IndexNotFound(String),
IoError(Error),
InternalError(String),
Unsupported(String),
SqlParserError(String),
CacheError(String),
ParallelError(String),
}Expand description
Errors that can occur during query processing.
Variants§
ParseError
Parse error with position information.
Fields
SemanticError(String)
Semantic error in query.
OptimizationError(String)
Optimization error.
ExecutionError(String)
Execution error.
TypeMismatch
Type mismatch error.
ColumnNotFound(String)
Column not found error.
TableNotFound(String)
Table not found error.
FunctionNotFound(String)
Function not found error.
InvalidArgument(String)
Invalid argument error.
IndexNotFound(String)
Index not found error.
IoError(Error)
IO error.
InternalError(String)
Internal error.
Unsupported(String)
Unsupported operation.
SqlParserError(String)
SQL parser error.
CacheError(String)
Cache error.
ParallelError(String)
Parallel execution error.
Implementations§
Source§impl QueryError
impl QueryError
Sourcepub fn parse_error(
message: impl Into<String>,
line: usize,
column: usize,
) -> Self
pub fn parse_error( message: impl Into<String>, line: usize, column: usize, ) -> Self
Create a parse error.
Sourcepub fn optimization(message: impl Into<String>) -> Self
pub fn optimization(message: impl Into<String>) -> Self
Create an optimization error.
Sourcepub fn type_mismatch(
expected: impl Into<String>,
actual: impl Into<String>,
) -> Self
pub fn type_mismatch( expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Create a type mismatch error.
Sourcepub fn unsupported(message: impl Into<String>) -> Self
pub fn unsupported(message: impl Into<String>) -> Self
Create an unsupported operation error.
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Get the error code for this query error
Error codes are stable across versions and can be used for documentation and error handling.
Sourcepub fn suggestion(&self) -> Option<&'static str>
pub fn suggestion(&self) -> Option<&'static str>
Get a helpful suggestion for fixing this query error
Returns a human-readable suggestion including alternative query structures.
Sourcepub fn context(&self) -> ErrorContext
pub fn context(&self) -> ErrorContext
Get additional context about this query error
Returns structured context including rule identification and query fragments.
Trait Implementations§
Source§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
Source§impl Error for QueryError
impl Error for QueryError
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<Error> for QueryError
impl From<Error> for QueryError
Source§impl From<ParserError> for QueryError
impl From<ParserError> for QueryError
Source§fn from(err: ParserError) -> Self
fn from(err: ParserError) -> Self
Auto Trait Implementations§
impl Freeze for QueryError
impl !RefUnwindSafe for QueryError
impl Send for QueryError
impl Sync for QueryError
impl Unpin for QueryError
impl UnsafeUnpin for QueryError
impl !UnwindSafe for QueryError
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> 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