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()