pub enum QueryError {
Show 13 variants
ParseError(String),
TableNotFound(String),
ColumnNotFound {
table: String,
column: String,
},
ParameterNotFound(usize),
TypeMismatch {
expected: String,
actual: String,
},
UnsupportedFeature(String),
SqlTooComplex {
kind: &'static str,
value: usize,
limit: usize,
},
ConstraintViolation(String),
DuplicatePrimaryKey {
table: String,
key: Vec<Value>,
},
CorrelatedCardinalityExceeded {
estimated: u64,
cap: u64,
},
AsOfBeforeRetentionHorizon {
requested_ns: i64,
horizon_ns: i64,
},
Store(StoreError),
Json(Error),
}Expand description
Errors that can occur during query parsing and execution.
Variants§
ParseError(String)
SQL syntax or parsing error.
TableNotFound(String)
Table not found in schema.
ColumnNotFound
Column not found in table.
ParameterNotFound(usize)
Query parameter not provided.
TypeMismatch
Type mismatch between expected and actual value.
UnsupportedFeature(String)
SQL feature not supported.
SqlTooComplex
SQL input exceeds a complexity limit (depth or token budget). Pre-parse guard that rejects pathological inputs which would trigger super-linear behavior in the upstream SQL parser.
Fields
ConstraintViolation(String)
Constraint violation (e.g., NOT NULL violation, type constraint).
Generic catch-all for non-uniqueness constraint failures.
Duplicate primary keys raise Self::DuplicatePrimaryKey instead
so SDK callers can pattern-match without parsing message strings.
DuplicatePrimaryKey
Duplicate primary-key value detected on INSERT.
Carries the table name and the rejected key tuple so callers can short-circuit retry/upsert flows without parsing the error string. Notebar’s webhook-dedup loop (try-INSERT-then-SELECT) is the canonical consumer.
Fields
Correlated subquery row-evaluation cap exceeded.
Emitted before the correlated-loop executor runs when the estimated
product of outer rows × inner rows per iteration exceeds the
configured cap (default 10_000_000; see
QueryEngine::with_correlated_cap). Fails fast rather than
consuming memory. See docs/reference/sql/correlated-subqueries.md.
AsOfBeforeRetentionHorizon
Requested AS OF TIMESTAMP precedes the earliest retained event.
Emitted when a FOR SYSTEM_TIME AS OF '<iso>' / AS OF TIMESTAMP
query asks for a wall-clock instant older than the oldest entry
in the timestamp-to-offset index (typically a freshly-opened
database, or a timestamp predating any write). Distinguished
from a general “no offset found” error so callers can surface
the retention horizon to the user.
requested_ns is the caller-supplied Unix-nanosecond timestamp;
horizon_ns is the earliest wall-clock instant the index can
answer for (or 0 when the log is empty).
Shipped with v0.6.0 Tier 2 #6 (AS OF TIMESTAMP time-travel).
Store(StoreError)
Underlying store error.
Json(Error)
JSON serialization/deserialization error.
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<Error> for QueryError
impl From<Error> for QueryError
Source§fn from(source: Error) -> QueryError
fn from(source: Error) -> QueryError
Source§impl From<QueryError> for KimberliteError
impl From<QueryError> for KimberliteError
Source§fn from(source: QueryError) -> Self
fn from(source: QueryError) -> Self
Source§impl From<RbacError> for QueryError
impl From<RbacError> for QueryError
Source§fn from(err: RbacError) -> QueryError
fn from(err: RbacError) -> QueryError
Source§impl From<StoreError> for QueryError
impl From<StoreError> for QueryError
Source§fn from(source: StoreError) -> QueryError
fn from(source: StoreError) -> QueryError
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> 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more