Skip to main content

ExecutorError

Enum ExecutorError 

Source
pub enum ExecutorError {
Show 103 variants TableNotFound(String), TableAlreadyExists(String), RenameTargetExists(String), SqliteSystemTableReadOnly { table_name: String, operation: String, }, ColumnNotFound { column_name: String, table_name: String, searched_tables: Vec<String>, available_columns: Vec<String>, }, InvalidTableQualifier { qualifier: String, column: String, available_tables: Vec<String>, }, AmbiguousColumnName { column_name: String, }, ColumnAlreadyExists(String), IndexNotFound(String), IndexAlreadyExists(String), InvalidIndexDefinition(String), TriggerNotFound(String), TriggerAlreadyExists(String), SchemaNotFound(String), SchemaAlreadyExists(String), SchemaNotEmpty(String), RoleNotFound(String), TypeNotFound(String), TypeAlreadyExists(String), TypeInUse(String), DependentPrivilegesExist(String), PermissionDenied { role: String, privilege: String, object: String, }, ColumnIndexOutOfBounds { index: usize, }, TypeMismatch { left: SqlValue, op: String, right: SqlValue, }, DivisionByZero, IntegerOverflow, InvalidWhereClause(String), WrongNumberOfArguments { function_name: String, }, MisuseOfAggregate { function_name: String, }, MisuseOfAggregateContext { function_name: String, }, MisuseOfAliasedAggregate { alias_name: String, }, MisuseOfWindowFunction { function_name: String, }, MisuseOfAliasedWindowFunction { alias_name: String, }, RowValueMisused, UnsupportedExpression(String), UnsupportedFeature(String), SqliteCompatError(String), StorageError(String), SubqueryReturnedMultipleRows { expected: usize, actual: usize, }, SubqueryColumnCountMismatch { expected: usize, actual: usize, }, SetOperationColumnMismatch { operator: String, }, ColumnCountMismatch { expected: usize, provided: usize, }, InsertColumnCountMismatch { table_name: String, expected: usize, provided: usize, has_explicit_columns: bool, }, ValuesRowCountMismatch, InsertNoSuchColumn { table_name: String, column_name: String, }, CannotInsertIntoGeneratedColumn { column_name: String, }, CastError { from_type: String, to_type: String, }, TypeConversionError { from: String, to: String, }, ConstraintViolation(String), Raise { action: RaiseAction, message: String, }, RaiseIgnore, ForeignKeyMismatch { child: String, parent: String, }, MultiplePrimaryKeys, CannotDropColumn(String), ConstraintNotFound { constraint_name: String, table_name: String, }, ExpressionDepthExceeded { depth: usize, max_depth: usize, }, QueryTimeoutExceeded { elapsed_seconds: u64, max_seconds: u64, }, RowLimitExceeded { rows_processed: usize, max_rows: usize, }, MemoryLimitExceeded { used_bytes: usize, max_bytes: usize, }, JoinTableLimitExceeded { table_count: usize, max_tables: usize, }, VariableNotFound { variable_name: String, available_variables: Vec<String>, }, LabelNotFound(String), SelectIntoRowCount { expected: usize, actual: usize, }, SelectIntoColumnCount { expected: usize, actual: usize, }, ProcedureNotFound { procedure_name: String, schema_name: String, available_procedures: Vec<String>, }, FunctionNotFound { function_name: String, schema_name: String, available_functions: Vec<String>, }, ParameterCountMismatch { routine_name: String, routine_type: String, expected: usize, actual: usize, parameter_signature: String, }, ParameterTypeMismatch { parameter_name: String, expected_type: String, actual_type: String, actual_value: String, }, TypeError(String), ArgumentCountMismatch { expected: usize, actual: usize, }, RecursionLimitExceeded { message: String, call_stack: Vec<String>, max_depth: usize, }, FunctionMustReturn, InvalidControlFlow(String), InvalidFunctionBody(String), FunctionReadOnlyViolation(String), ParseError(String), InvalidExtractField { field: String, value_type: String, }, ArrowDowncastError { expected_type: String, context: String, }, ColumnarTypeMismatch { operation: String, left_type: String, right_type: Option<String>, }, SimdOperationFailed { operation: String, reason: String, }, ColumnarColumnNotFound { column_index: usize, batch_columns: usize, }, ColumnarColumnNotFoundByName { column_name: String, }, ColumnarLengthMismatch { context: String, expected: usize, actual: usize, }, UnsupportedArrayType { operation: String, array_type: String, }, SpatialGeometryError { function_name: String, message: String, }, SpatialOperationFailed { function_name: String, message: String, }, SpatialArgumentError { function_name: String, expected: String, actual: String, }, CursorAlreadyExists(String), CursorNotFound(String), CursorAlreadyOpen(String), CursorNotOpen(String), CursorNotScrollable(String), AssertionViolation { assertion_name: String, }, OrderByOutOfRange { term_position: usize, column_number: i64, select_list_len: usize, }, GroupByOutOfRange { term_position: usize, column_number: i64, select_list_len: usize, }, OrderByTermNotInResultSet { term_position: usize, }, InvalidLimitOffset { clause: String, value: String, reason: String, }, JoinUsingColumnNotPresent { column_name: String, }, OnClauseReferencesRightTable, NoSuchColumn { column_ref: String, }, NoSuchFunction { function_name: String, }, NoSuchIndex { index_name: String, }, Other(String),
}

Variants§

§

TableNotFound(String)

§

TableAlreadyExists(String)

§

RenameTargetExists(String)

ALTER TABLE … RENAME TO target collides with an existing table or index name. SQLite reports this with a distinct message that spans both the table and index namespaces.

§

SqliteSystemTableReadOnly

SQLite system table may not be modified (sqlite_master, sqlite_schema)

Fields

§table_name: String
§operation: String
§

ColumnNotFound

Fields

§column_name: String
§table_name: String
§searched_tables: Vec<String>
§available_columns: Vec<String>
§

InvalidTableQualifier

Fields

§qualifier: String
§column: String
§available_tables: Vec<String>
§

AmbiguousColumnName

Ambiguous column name in JOIN query (SQLite-compatible error) Raised when an unqualified column reference matches columns in multiple tables

Fields

§column_name: String
§

ColumnAlreadyExists(String)

§

IndexNotFound(String)

§

IndexAlreadyExists(String)

§

InvalidIndexDefinition(String)

§

TriggerNotFound(String)

§

TriggerAlreadyExists(String)

§

SchemaNotFound(String)

§

SchemaAlreadyExists(String)

§

SchemaNotEmpty(String)

§

RoleNotFound(String)

§

TypeNotFound(String)

§

TypeAlreadyExists(String)

§

TypeInUse(String)

§

DependentPrivilegesExist(String)

§

PermissionDenied

Fields

§role: String
§privilege: String
§object: String
§

ColumnIndexOutOfBounds

Fields

§index: usize
§

TypeMismatch

Fields

§right: SqlValue
§

DivisionByZero

§

IntegerOverflow

Integer overflow in arithmetic operation (SQLite-compatible error) Format: “integer overflow”

§

InvalidWhereClause(String)

§

WrongNumberOfArguments

Wrong number of arguments to a function (SQLite-compatible error)

Fields

§function_name: String
§

MisuseOfAggregate

Misuse of aggregate function (SQLite-compatible error) e.g., aggregate in WHERE clause or nested aggregates Format: “misuse of aggregate function X()”

Fields

§function_name: String
§

MisuseOfAggregateContext

Misuse of aggregate in ORDER BY or other execution contexts (SQLite-compatible) Format: “misuse of aggregate: X()” (note the colon, not “function”)

Fields

§function_name: String
§

MisuseOfAliasedAggregate

Misuse of aliased aggregate (SQLite-compatible error) e.g., HAVING max(alias) where alias refers to an aggregate like min(x)

Fields

§alias_name: String
§

MisuseOfWindowFunction

Misuse of window function (SQLite-compatible error) e.g., window function in WHERE, GROUP BY, or HAVING clause Format: “misuse of window function X()”

Fields

§function_name: String
§

MisuseOfAliasedWindowFunction

Misuse of aliased window function (SQLite-compatible error) e.g., ORDER BY (SELECT m) where m is an alias for a window function like count() OVER() Format: “misuse of aliased window function X”

Fields

§alias_name: String
§

RowValueMisused

Row value used in scalar context (SQLite-compatible error) e.g., HAVING (SELECT (a, b)) — a row value where a scalar is expected Format: “row value misused”

§

UnsupportedExpression(String)

§

UnsupportedFeature(String)

§

SqliteCompatError(String)

SQLite-compatible error message (output as-is without prefix) Used when we need to match SQLite’s exact error message format

§

StorageError(String)

§

SubqueryReturnedMultipleRows

Fields

§expected: usize
§actual: usize
§

SubqueryColumnCountMismatch

Fields

§expected: usize
§actual: usize
§

SetOperationColumnMismatch

Set operation (UNION, INTERSECT, EXCEPT) column count mismatch (SQLite-compatible) Format: “SELECTs to the left and right of {op} do not have the same number of result columns”

Fields

§operator: String

The set operator name: “UNION”, “UNION ALL”, “INTERSECT”, “INTERSECT ALL”, “EXCEPT”, “EXCEPT ALL”

§

ColumnCountMismatch

Fields

§expected: usize
§provided: usize
§

InsertColumnCountMismatch

Fields

§table_name: String
§expected: usize
§provided: usize
§has_explicit_columns: bool

Whether explicit column list was provided in INSERT statement

§

ValuesRowCountMismatch

VALUES rows have inconsistent number of terms (SQLite-compatible error) Format: “all VALUES must have the same number of terms”

§

InsertNoSuchColumn

Column not found in INSERT statement (SQLite-compatible error) Format: “table T has no column named C”

Fields

§table_name: String
§column_name: String
§

CannotInsertIntoGeneratedColumn

Cannot INSERT into a generated column (SQLite-compatible error) Format: “cannot INSERT into generated column "C"”

Fields

§column_name: String
§

CastError

Fields

§from_type: String
§to_type: String
§

TypeConversionError

Fields

§from: String
§

ConstraintViolation(String)

§

Raise

A RAISE(ABORT|FAIL|ROLLBACK, msg) expression fired inside a trigger body (SQLite RAISE). Carries the conflict-resolution action so the trigger / DML / transaction layer can apply the correct rollback scope:

  • Abort rolls back the current statement (default),
  • Fail stops the statement but keeps its already-applied row changes,
  • Rollback rolls back the whole enclosing transaction.

RAISE(IGNORE) is not represented here: it is a control-flow signal (abandon the current row, no error) and uses ExecutorError::RaiseIgnore.

Fields

§message: String
§

RaiseIgnore

A RAISE(IGNORE) expression fired inside a trigger body. This is a control-flow signal, not a user-visible error: the enclosing trigger / row-processing loop catches it, abandons the current row, and continues without reporting an error. If it ever escapes to a user (RAISE(IGNORE) outside any trigger), it is surfaced as a benign no-op-style message.

§

ForeignKeyMismatch

FOREIGN KEY references a parent column set that is not covered by a PRIMARY KEY, UNIQUE constraint, or non-partial UNIQUE INDEX in the parent table (SQLite-compatible error). Format: foreign key mismatch - "<child>" referencing "<parent>"

Fields

§child: String
§parent: String
§

MultiplePrimaryKeys

§

CannotDropColumn(String)

§

ConstraintNotFound

Fields

§constraint_name: String
§table_name: String
§

ExpressionDepthExceeded

Expression evaluation exceeded maximum recursion depth This prevents stack overflow from deeply nested expressions or subqueries

Fields

§depth: usize
§max_depth: usize
§

QueryTimeoutExceeded

Query exceeded maximum execution time

Fields

§elapsed_seconds: u64
§max_seconds: u64
§

RowLimitExceeded

Query exceeded maximum row processing limit

Fields

§rows_processed: usize
§max_rows: usize
§

MemoryLimitExceeded

Query exceeded maximum memory limit

Fields

§used_bytes: usize
§max_bytes: usize
§

JoinTableLimitExceeded

Join exceeded maximum number of tables (SQLite-compatible error) Format: “at most 64 tables in a join”

Fields

§table_count: usize
§max_tables: usize
§

VariableNotFound

Variable not found in procedural context (with available variables)

Fields

§variable_name: String
§available_variables: Vec<String>
§

LabelNotFound(String)

Label not found in procedural context

§

SelectIntoRowCount

Procedural SELECT INTO returned wrong number of rows (must be exactly 1)

Fields

§expected: usize
§actual: usize
§

SelectIntoColumnCount

Procedural SELECT INTO column count doesn’t match variable count

Fields

§expected: usize
§actual: usize
§

ProcedureNotFound

Procedure not found (with suggestions)

Fields

§procedure_name: String
§schema_name: String
§available_procedures: Vec<String>
§

FunctionNotFound

Function not found (with suggestions)

Fields

§function_name: String
§schema_name: String
§available_functions: Vec<String>
§

ParameterCountMismatch

Parameter count mismatch with details

Fields

§routine_name: String
§routine_type: String
§expected: usize
§actual: usize
§parameter_signature: String
§

ParameterTypeMismatch

Parameter type mismatch with details

Fields

§parameter_name: String
§expected_type: String
§actual_type: String
§actual_value: String
§

TypeError(String)

Type error in expression evaluation

§

ArgumentCountMismatch

Function argument count mismatch

Fields

§expected: usize
§actual: usize
§

RecursionLimitExceeded

Recursion limit exceeded in function/procedure calls (with call stack)

Fields

§message: String
§call_stack: Vec<String>
§max_depth: usize
§

FunctionMustReturn

Function must return a value but did not

§

InvalidControlFlow(String)

Invalid control flow (e.g., LEAVE/ITERATE outside of loop)

§

InvalidFunctionBody(String)

Invalid function body syntax

§

FunctionReadOnlyViolation(String)

Function attempted to modify data (read-only violation)

§

ParseError(String)

Parse error

§

InvalidExtractField

Invalid EXTRACT field for the given value type

Fields

§field: String
§value_type: String
§

ArrowDowncastError

Arrow array downcast failed (columnar execution)

Fields

§expected_type: String
§context: String
§

ColumnarTypeMismatch

Type mismatch in columnar operations

Fields

§operation: String
§left_type: String
§right_type: Option<String>
§

SimdOperationFailed

SIMD operation failed (returned None or error)

Fields

§operation: String
§reason: String
§

ColumnarColumnNotFound

Column not found in batch by index

Fields

§column_index: usize
§batch_columns: usize
§

ColumnarColumnNotFoundByName

Column not found in batch by name

Fields

§column_name: String
§

ColumnarLengthMismatch

Column length mismatch in batch operations

Fields

§context: String
§expected: usize
§actual: usize
§

UnsupportedArrayType

Unsupported array type for columnar operation

Fields

§operation: String
§array_type: String
§

SpatialGeometryError

Invalid or incompatible geometry type in spatial function

Fields

§function_name: String
§message: String
§

SpatialOperationFailed

Spatial operation failed (distance, intersection, etc.)

Fields

§function_name: String
§message: String
§

SpatialArgumentError

Spatial function argument count or type mismatch

Fields

§function_name: String
§expected: String
§actual: String
§

CursorAlreadyExists(String)

Cursor already exists with this name

§

CursorNotFound(String)

Cursor not found

§

CursorAlreadyOpen(String)

Cursor is already open

§

CursorNotOpen(String)

Cursor is not open (must OPEN before FETCH)

§

CursorNotScrollable(String)

Cursor does not support backward movement (not declared with SCROLL)

§

AssertionViolation

Assertion constraint violation (SQL:1999 Feature F671/F672)

Fields

§assertion_name: String
§

OrderByOutOfRange

ORDER BY column number out of range (SQLite-compatible error)

Fields

§term_position: usize
§column_number: i64
§select_list_len: usize
§

GroupByOutOfRange

GROUP BY column number out of range (SQLite-compatible error)

Fields

§term_position: usize
§column_number: i64
§select_list_len: usize
§

OrderByTermNotInResultSet

ORDER BY term doesn’t match any column in the result set Used for compound queries (UNION, INTERSECT, EXCEPT) where ORDER BY must reference result columns by position or alias

Fields

§term_position: usize
§

InvalidLimitOffset

Invalid LIMIT or OFFSET value (SQLite-compatible error)

Fields

§clause: String
§value: String
§reason: String
§

JoinUsingColumnNotPresent

JOIN USING column not present in both tables (SQLite-compatible error) Format: “cannot join using column X - column not present in both tables”

Fields

§column_name: String
§

OnClauseReferencesRightTable

ON clause references a table that appears to the right (SQLite-compatible error) Format: “ON clause references tables to its right” This error occurs when a JOIN ON clause references a table that hasn’t been introduced yet (appears later in the FROM clause).

§

NoSuchColumn

No such column (SQLite-compatible error) Format: “no such column: X” or “no such column: table.column”

Fields

§column_ref: String
§

NoSuchFunction

No such function (SQLite-compatible error) Format: “no such function: X”

Fields

§function_name: String
§

NoSuchIndex

No such index (SQLite-compatible error, e.g. INDEXED BY with an unknown index or an index on a different table) Format: “no such index: X”

Fields

§index_name: String
§

Other(String)

Implementations§

Source§

impl ExecutorError

Source

pub fn is_non_deterministic_use(&self) -> bool

True for the SQLite-compatible “non-deterministic use of () in ” error raised when a date/time function resolves the current time (or applies ‘localtime’/‘utc’) inside a CHECK constraint, generated column, or index expression.

Lenient evaluation sites (e.g. index-maintenance paths that map other evaluation errors to NULL/false) use this to ensure the rejection is PROPAGATED instead of swallowed — the enclosing statement must abort.

Source

pub fn with_main_schema_qualifier(self) -> ExecutorError

Qualify a TableNotFound for an unqualified table name with the implicit main. schema prefix, matching sqlite3’s reporting when a table is resolved against the database schema (e.g. a table referenced in a view definition body that has since been dropped: no such table: main.test2, trigger4-3.1/3.2/3.3).

Only bare names are rewritten — names that already carry a schema qualifier (contain a .) and every other error variant are returned unchanged.

Trait Implementations§

Source§

impl Clone for ExecutorError

Source§

fn clone(&self) -> ExecutorError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutorError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for ExecutorError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for ExecutorError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CatalogError> for ExecutorError

Source§

fn from(err: CatalogError) -> Self

Converts to this type from the input type.
Source§

impl From<ExecutorError> for SessionError

Source§

fn from(e: ExecutorError) -> Self

Converts to this type from the input type.
Source§

impl From<ExecutorError> for ReadOnlyError

Source§

fn from(e: ExecutorError) -> Self

Converts to this type from the input type.
Source§

impl From<StorageError> for ExecutorError

Source§

fn from(err: StorageError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExecutorError

Source§

fn eq(&self, other: &ExecutorError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExecutorError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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> AnyEq for T
where T: Any + PartialEq,

Source§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

fn as_any(&self) -> &(dyn Any + 'static)

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool