pub enum ConversionError {
Show 16 variants
MissingColumn {
identifier: Box<Identifier>,
resource_id: Box<ResourceId>,
},
MissingColumnWithoutTable {
identifier: Box<Identifier>,
},
InvalidDataType {
expected: ColumnType,
actual: ColumnType,
},
DataTypeMismatch {
left_type: String,
right_type: String,
},
DifferentColumnLength {
len_a: usize,
len_b: usize,
},
DuplicateResultAlias {
alias: String,
},
NonbooleanWhereClause {
datatype: ColumnType,
},
InvalidOrderBy {
alias: String,
},
InvalidGroupByColumnRef {
column: String,
},
InvalidExpression {
expression: String,
},
ParseError {
error: String,
},
DecimalConversionError {
source: DecimalError,
},
TimestampConversionError {
source: PoSQLTimestampError,
},
ColumnOperationError {
source: ColumnOperationError,
},
PostprocessingError {
source: PostprocessingError,
},
Unprovable {
error: String,
},
}
Expand description
Errors from converting an intermediate AST into a provable AST.
Variants§
MissingColumn
The column is missing in the table
Fields
identifier: Box<Identifier>
The missing column identifier
resource_id: Box<ResourceId>
The table resource id
MissingColumnWithoutTable
The column is missing (without table information)
Fields
identifier: Box<Identifier>
The missing column identifier
InvalidDataType
Invalid data type received
DataTypeMismatch
Data types do not match
DifferentColumnLength
Two columns do not have the same length
DuplicateResultAlias
Duplicate alias in result columns
NonbooleanWhereClause
WHERE clause is not boolean
Fields
datatype: ColumnType
The actual datatype of the WHERE clause
InvalidOrderBy
ORDER BY clause references a non-existent alias
InvalidGroupByColumnRef
GROUP BY clause references a non-existent column
InvalidExpression
General error for invalid expressions
ParseError
General parsing error
DecimalConversionError
Errors related to decimal operations
Fields
source: DecimalError
The underlying source error
TimestampConversionError
Errors related to timestamp parsing
Fields
source: PoSQLTimestampError
The underlying source error
ColumnOperationError
Errors related to column operations
Fields
source: ColumnOperationError
The underlying source error
PostprocessingError
Errors related to postprocessing
Fields
source: PostprocessingError
The underlying source error
Unprovable
Query requires unprovable feature
Implementations§
source§impl ConversionError
impl ConversionError
sourcepub fn non_numeric_expr_in_agg<S: Into<String>>(dtype: S, func: S) -> Self
pub fn non_numeric_expr_in_agg<S: Into<String>>(dtype: S, func: S) -> Self
Returns a ConversionError::InvalidExpression
for non-numeric types used in numeric aggregation functions.
Trait Implementations§
source§impl Debug for ConversionError
impl Debug for ConversionError
source§impl Display for ConversionError
impl Display for ConversionError
source§impl Error for ConversionError
impl Error for ConversionError
source§fn description(&self) -> &str
fn description(&self) -> &str
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
source§impl ErrorCompat for ConversionError
impl ErrorCompat for ConversionError
source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source
. Read moresource§impl From<ColumnOperationError> for ConversionError
impl From<ColumnOperationError> for ConversionError
source§fn from(error: ColumnOperationError) -> Self
fn from(error: ColumnOperationError) -> Self
source§impl From<ConversionError> for String
impl From<ConversionError> for String
source§fn from(error: ConversionError) -> Self
fn from(error: ConversionError) -> Self
source§impl From<DecimalError> for ConversionError
impl From<DecimalError> for ConversionError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
source§impl From<IntermediateDecimalError> for ConversionError
impl From<IntermediateDecimalError> for ConversionError
source§fn from(err: IntermediateDecimalError) -> ConversionError
fn from(err: IntermediateDecimalError) -> ConversionError
source§impl From<PoSQLTimestampError> for ConversionError
impl From<PoSQLTimestampError> for ConversionError
source§fn from(error: PoSQLTimestampError) -> Self
fn from(error: PoSQLTimestampError) -> Self
source§impl From<PostprocessingError> for ConversionError
impl From<PostprocessingError> for ConversionError
source§fn from(error: PostprocessingError) -> Self
fn from(error: PostprocessingError) -> Self
source§impl From<String> for ConversionError
impl From<String> for ConversionError
source§impl PartialEq for ConversionError
impl PartialEq for ConversionError
impl Eq for ConversionError
impl StructuralPartialEq for ConversionError
Auto Trait Implementations§
impl Freeze for ConversionError
impl RefUnwindSafe for ConversionError
impl Send for ConversionError
impl Sync for ConversionError
impl Unpin for ConversionError
impl UnwindSafe for ConversionError
Blanket Implementations§
source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
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<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§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