#[non_exhaustive]pub enum QueryError {
Parse(ParseError),
Type(String),
UnknownColumn(String),
UnknownFunction(String),
InvalidArguments(String, String),
Aggregation(String),
Evaluation(String),
PivotWrongArity(usize),
PivotSameColumn,
PivotSecondNotInGroupBy,
PivotWithoutGroupBy,
}Expand description
Error returned when executing a query fails.
Marked #[non_exhaustive] so adding new variants doesn’t break
downstream consumers that match exhaustively.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parse(ParseError)
Parse error.
Type(String)
Type error (incompatible types in operation).
UnknownColumn(String)
Unknown column name.
UnknownFunction(String)
Unknown function name.
InvalidArguments(String, String)
Invalid function arguments.
Aggregation(String)
Aggregation error.
Evaluation(String)
Evaluation error.
PivotWrongArity(usize)
PIVOT BY clause does not have exactly two columns.
Matches bean-query’s compiler check (_compile_pivot_by in
beanquery/compiler.py). The first column is the pivot value
(whose values become new column headers); the second is the
GROUP BY column to keep as the row key.
PivotSameColumn
PIVOT BY’s two columns refer to the same target.
Bean-query message: the two PIVOT BY columns cannot be the same column. Same wording reused for upstream parity.
PivotSecondNotInGroupBy
PIVOT BY’s second column isn’t in the GROUP BY clause.
The second pivot column has to be a GROUP BY key — otherwise
the pivot output rows wouldn’t have a stable identity. Bean-
query message: the second PIVOT BY column must be a GROUP BY column.
PivotWithoutGroupBy
PIVOT BY used on a query with no GROUP BY clause.
Implicit grouping (a SELECT with aggregates but no GROUP BY)
produces a single row whose key is undefined; PIVOT BY’s second
column has nothing meaningful to refer to. Distinct from
PivotSecondNotInGroupBy (which is for “GROUP BY exists but the
key column isn’t in it”).
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<ParseError> for QueryError
impl From<ParseError> for QueryError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> 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> 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> 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.