pub enum PlannerError {
Show 13 variants
TableNotFound {
name: String,
line: u64,
column: u64,
},
TableAlreadyExists {
name: String,
},
ColumnNotFound {
column: String,
table: String,
line: u64,
col: u64,
},
AmbiguousColumn {
column: String,
tables: Vec<String>,
line: u64,
col: u64,
},
IndexAlreadyExists {
name: String,
},
IndexNotFound {
name: String,
},
TypeMismatch {
expected: String,
found: String,
line: u64,
column: u64,
},
InvalidOperator {
op: String,
type_name: String,
line: u64,
column: u64,
},
NullConstraintViolation {
column: String,
line: u64,
col: u64,
},
VectorDimensionMismatch {
expected: u32,
found: u32,
line: u64,
column: u64,
},
InvalidMetric {
value: String,
line: u64,
column: u64,
},
ColumnValueCountMismatch {
columns: usize,
values: usize,
line: u64,
column: u64,
},
UnsupportedFeature {
feature: String,
version: String,
line: u64,
column: u64,
},
}Expand description
Planner errors for the Alopex SQL dialect.
Variants§
TableNotFound
ALOPEX-C001: Table not found.
TableAlreadyExists
ALOPEX-C002: Table already exists.
ColumnNotFound
ALOPEX-C003: Column not found.
AmbiguousColumn
ALOPEX-C004: Ambiguous column reference.
IndexAlreadyExists
ALOPEX-C005: Index already exists.
IndexNotFound
ALOPEX-C006: Index not found.
TypeMismatch
ALOPEX-T001: Type mismatch.
InvalidOperator
ALOPEX-T002: Invalid operator for type.
NullConstraintViolation
ALOPEX-T003: NULL constraint violation.
VectorDimensionMismatch
ALOPEX-T004: Vector dimension mismatch.
InvalidMetric
ALOPEX-T005: Invalid metric.
ColumnValueCountMismatch
ALOPEX-T006: Column count does not match value count.
UnsupportedFeature
ALOPEX-F001: Unsupported feature.
Implementations§
Source§impl PlannerError
impl PlannerError
Sourcepub fn table_not_found(name: impl Into<String>, span: Span) -> Self
pub fn table_not_found(name: impl Into<String>, span: Span) -> Self
Create a TableNotFound error from a span.
Sourcepub fn table_already_exists(name: impl Into<String>) -> Self
pub fn table_already_exists(name: impl Into<String>) -> Self
Create a TableAlreadyExists error.
Sourcepub fn column_not_found(
column: impl Into<String>,
table: impl Into<String>,
span: Span,
) -> Self
pub fn column_not_found( column: impl Into<String>, table: impl Into<String>, span: Span, ) -> Self
Create a ColumnNotFound error from a span.
Sourcepub fn ambiguous_column(
column: impl Into<String>,
tables: Vec<String>,
span: Span,
) -> Self
pub fn ambiguous_column( column: impl Into<String>, tables: Vec<String>, span: Span, ) -> Self
Create an AmbiguousColumn error from a span.
Sourcepub fn index_already_exists(name: impl Into<String>) -> Self
pub fn index_already_exists(name: impl Into<String>) -> Self
Create an IndexAlreadyExists error.
Sourcepub fn index_not_found(name: impl Into<String>) -> Self
pub fn index_not_found(name: impl Into<String>) -> Self
Create an IndexNotFound error.
Sourcepub fn type_mismatch(
expected: impl Into<String>,
found: impl Into<String>,
span: Span,
) -> Self
pub fn type_mismatch( expected: impl Into<String>, found: impl Into<String>, span: Span, ) -> Self
Create a TypeMismatch error from a span.
Sourcepub fn invalid_operator(
op: impl Into<String>,
type_name: impl Into<String>,
span: Span,
) -> Self
pub fn invalid_operator( op: impl Into<String>, type_name: impl Into<String>, span: Span, ) -> Self
Create an InvalidOperator error from a span.
Sourcepub fn null_constraint_violation(column: impl Into<String>, span: Span) -> Self
pub fn null_constraint_violation(column: impl Into<String>, span: Span) -> Self
Create a NullConstraintViolation error from a span.
Sourcepub fn vector_dimension_mismatch(expected: u32, found: u32, span: Span) -> Self
pub fn vector_dimension_mismatch(expected: u32, found: u32, span: Span) -> Self
Create a VectorDimensionMismatch error from a span.
Sourcepub fn invalid_metric(value: impl Into<String>, span: Span) -> Self
pub fn invalid_metric(value: impl Into<String>, span: Span) -> Self
Create an InvalidMetric error from a span.
Sourcepub fn column_value_count_mismatch(
columns: usize,
values: usize,
span: Span,
) -> Self
pub fn column_value_count_mismatch( columns: usize, values: usize, span: Span, ) -> Self
Create a ColumnValueCountMismatch error from a span.
Trait Implementations§
Source§impl Clone for PlannerError
impl Clone for PlannerError
Source§fn clone(&self) -> PlannerError
fn clone(&self) -> PlannerError
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlannerError
impl Debug for PlannerError
Source§impl Display for PlannerError
impl Display for PlannerError
Source§impl Error for PlannerError
impl Error for PlannerError
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<PlannerError> for ExecutorError
impl From<PlannerError> for ExecutorError
Source§fn from(source: PlannerError) -> Self
fn from(source: PlannerError) -> Self
Source§impl From<PlannerError> for SqlError
impl From<PlannerError> for SqlError
Source§fn from(value: PlannerError) -> Self
fn from(value: PlannerError) -> Self
Source§impl PartialEq for PlannerError
impl PartialEq for PlannerError
impl Eq for PlannerError
impl StructuralPartialEq for PlannerError
Auto Trait Implementations§
impl Freeze for PlannerError
impl RefUnwindSafe for PlannerError
impl Send for PlannerError
impl Sync for PlannerError
impl Unpin for PlannerError
impl UnwindSafe for PlannerError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)