pub enum PlannerError {
Show 24 variants
InvalidPragma {
name: String,
reason: String,
},
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,
},
UnknownTableFunction {
name: String,
line: u64,
column: u64,
},
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,
},
InvalidExpression {
message: String,
},
SetOperationColumnCountMismatch {
left: usize,
right: usize,
line: u64,
column: u64,
},
CteColumnCountMismatch {
cte: String,
declared: usize,
actual: usize,
line: u64,
column: u64,
},
DuplicateCteColumn {
cte: String,
name: String,
line: u64,
column: u64,
},
ValuesColumnCountMismatch {
row: usize,
expected: usize,
actual: usize,
line: u64,
column: u64,
},
TableAliasColumnCountMismatch {
alias: String,
declared: usize,
actual: usize,
line: u64,
column: u64,
},
RowArityMismatch {
expected: usize,
actual: usize,
line: u64,
column: u64,
},
DistinctOnOrderByMismatch {
line: u64,
column: u64,
},
LateralJoinTypeUnsupported {
join_type: String,
line: u64,
column: u64,
},
UnsupportedFeature {
feature: String,
version: String,
line: u64,
column: u64,
},
}Expand description
Planner errors for the Alopex SQL dialect.
Variants§
InvalidPragma
Invalid PRAGMA name or value.
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.
UnknownTableFunction
ALOPEX-C007: FROM-clause table function not in the closed registry.
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.
InvalidExpression
ALOPEX-T007: Invalid expression for the current context.
SetOperationColumnCountMismatch
ALOPEX-T008: Set-operation inputs expose different numbers of columns.
CteColumnCountMismatch
ALOPEX-T009: A CTE column-name list does not match its query width.
DuplicateCteColumn
ALOPEX-T010: A CTE column-name list contains the same name twice.
ValuesColumnCountMismatch
ALOPEX-T011: VALUES rows expose different numbers of columns.
TableAliasColumnCountMismatch
ALOPEX-T012: A relation alias column list does not match the relation width. Covers derived tables, base tables, and table functions (issue #151).
RowArityMismatch
ALOPEX-T013: Row operands expose different numbers of fields.
DistinctOnOrderByMismatch
ALOPEX-T014: DISTINCT ON keys do not form the initial ORDER BY prefix. Message and semantics follow PostgreSQL error 42P10 (D2 in docs/sql-distinct-on.md).
LateralJoinTypeUnsupported
ALOPEX-T015: RIGHT or FULL JOIN with a LATERAL right side (issue #151). PostgreSQL rejects the same shape: the correlated side cannot be the null-supplying side of the join.
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 unknown_table_function(name: impl Into<String>, span: Span) -> Self
pub fn unknown_table_function(name: impl Into<String>, span: Span) -> Self
Create an UnknownTableFunction error from a span.
Sourcepub fn lateral_join_type_unsupported(
join_type: impl Into<String>,
span: Span,
) -> Self
pub fn lateral_join_type_unsupported( join_type: impl Into<String>, span: Span, ) -> Self
Create a LateralJoinTypeUnsupported error from a span.
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_expression(message: impl Into<String>) -> Self
pub fn invalid_expression(message: impl Into<String>) -> Self
Create an InvalidExpression error.
Sourcepub fn set_operation_column_count_mismatch(
left: usize,
right: usize,
span: Span,
) -> Self
pub fn set_operation_column_count_mismatch( left: usize, right: usize, span: Span, ) -> Self
Create a set-operation column-count error from a span.
Sourcepub fn cte_column_count_mismatch(
cte: impl Into<String>,
declared: usize,
actual: usize,
span: Span,
) -> Self
pub fn cte_column_count_mismatch( cte: impl Into<String>, declared: usize, actual: usize, span: Span, ) -> Self
Create a CTE column-count error from a span.
Sourcepub fn duplicate_cte_column(
cte: impl Into<String>,
column_name: impl Into<String>,
span: Span,
) -> Self
pub fn duplicate_cte_column( cte: impl Into<String>, column_name: impl Into<String>, span: Span, ) -> Self
Create a duplicate CTE column-name error from a span.
Sourcepub fn values_column_count_mismatch(
row: usize,
expected: usize,
actual: usize,
span: Span,
) -> Self
pub fn values_column_count_mismatch( row: usize, expected: usize, actual: usize, span: Span, ) -> Self
Create a VALUES row-width error from a span.
Sourcepub fn table_alias_column_count_mismatch(
alias: impl Into<String>,
declared: usize,
actual: usize,
span: Span,
) -> Self
pub fn table_alias_column_count_mismatch( alias: impl Into<String>, declared: usize, actual: usize, span: Span, ) -> Self
Create a derived-table alias-width 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.
Sourcepub fn distinct_on_order_by_mismatch(span: Span) -> Self
pub fn distinct_on_order_by_mismatch(span: Span) -> Self
Create a DistinctOnOrderByMismatch 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 (const: unstable) · Source§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
impl Eq for PlannerError
Source§impl Error for PlannerError
impl Error for PlannerError
1.30.0 · 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()