kimberlite_query/
error.rs1use kimberlite_store::StoreError;
4
5#[derive(thiserror::Error, Debug)]
7pub enum QueryError {
8 #[error("parse error: {0}")]
10 ParseError(String),
11
12 #[error("table '{0}' not found")]
14 TableNotFound(String),
15
16 #[error("column '{column}' not found in table '{table}'")]
18 ColumnNotFound { table: String, column: String },
19
20 #[error("parameter ${0} not provided")]
22 ParameterNotFound(usize),
23
24 #[error("type mismatch: expected {expected}, got {actual}")]
26 TypeMismatch { expected: String, actual: String },
27
28 #[error("unsupported feature: {0}")]
30 UnsupportedFeature(String),
31
32 #[error("constraint violation: {0}")]
34 ConstraintViolation(String),
35
36 #[error("store error: {0}")]
38 Store(#[from] StoreError),
39
40 #[error("json error: {0}")]
42 Json(#[from] serde_json::Error),
43}
44
45pub type Result<T> = std::result::Result<T, QueryError>;