AnalyzerErrorKind

Enum AnalyzerErrorKind 

Source
pub enum AnalyzerErrorKind {
Show 23 variants TableNotFound { name: String, }, ColumnNotFound { name: String, table: Option<String>, }, AmbiguousColumn { name: String, tables: Vec<String>, }, FunctionNotFound { name: String, }, WrongArgumentCount { function: String, expected_min: usize, expected_max: Option<usize>, actual: usize, }, TypeMismatch { expected: SqlType, actual: SqlType, context: String, }, TypesNotComparable { left: SqlType, right: SqlType, }, InvalidAggregateUse { function: String, reason: String, }, InvalidWindowUse { function: String, reason: String, }, DuplicateAlias { name: String, }, DuplicateGroupByColumn { name: String, }, NonAggregatedColumn { column: String, }, OrderByNotInSelect { column: String, }, HavingWithoutGroupBy, InvalidSubquery { reason: String, }, DivisionByZero, InvalidCast { from: SqlType, to: SqlType, }, InvalidDateTimeLiteral { value: String, expected_type: String, }, DuplicateCte { name: String, }, InvalidRecursiveCte { reason: String, }, StarNotAllowed { context: String, }, SetOperationColumnMismatch { left: usize, right: usize, }, Other { message: String, },
}
Expand description

Analyzer error kinds.

Variants§

§

TableNotFound

Table not found in catalog.

Fields

§name: String
§

ColumnNotFound

Column not found.

Fields

§name: String
§

AmbiguousColumn

Ambiguous column reference.

Fields

§name: String
§tables: Vec<String>
§

FunctionNotFound

Function not found.

Fields

§name: String
§

WrongArgumentCount

Wrong number of arguments to function.

Fields

§function: String
§expected_min: usize
§expected_max: Option<usize>
§actual: usize
§

TypeMismatch

Type mismatch in expression.

Fields

§expected: SqlType
§actual: SqlType
§context: String
§

TypesNotComparable

Types are not comparable.

Fields

§left: SqlType
§right: SqlType
§

InvalidAggregateUse

Invalid use of aggregate function.

Fields

§function: String
§reason: String
§

InvalidWindowUse

Invalid use of window function.

Fields

§function: String
§reason: String
§

DuplicateAlias

Duplicate alias.

Fields

§name: String
§

DuplicateGroupByColumn

Duplicate column in GROUP BY.

Fields

§name: String
§

NonAggregatedColumn

Non-aggregated column in SELECT with GROUP BY.

Fields

§column: String
§

OrderByNotInSelect

ORDER BY column not in SELECT (when DISTINCT is used).

Fields

§column: String
§

HavingWithoutGroupBy

Invalid HAVING clause (no GROUP BY).

§

InvalidSubquery

Invalid subquery.

Fields

§reason: String
§

DivisionByZero

Division by zero (constant folding).

§

InvalidCast

Invalid CAST.

Fields

§from: SqlType
§

InvalidDateTimeLiteral

Invalid date/time literal.

Fields

§value: String
§expected_type: String
§

DuplicateCte

CTE name conflict.

Fields

§name: String
§

InvalidRecursiveCte

Recursive CTE without UNION ALL.

Fields

§reason: String
§

StarNotAllowed

Star (*) not allowed in this context.

Fields

§context: String
§

SetOperationColumnMismatch

EXCEPT/INTERSECT column count mismatch.

Fields

§left: usize
§right: usize
§

Other

Unknown error.

Fields

§message: String

Trait Implementations§

Source§

impl Clone for AnalyzerErrorKind

Source§

fn clone(&self) -> AnalyzerErrorKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnalyzerErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.