use kimberlite_store::StoreError;
#[derive(thiserror::Error, Debug)]
pub enum QueryError {
#[error("parse error: {0}")]
ParseError(String),
#[error("table '{0}' not found")]
TableNotFound(String),
#[error("column '{column}' not found in table '{table}'")]
ColumnNotFound { table: String, column: String },
#[error("parameter ${0} not provided")]
ParameterNotFound(usize),
#[error("type mismatch: expected {expected}, got {actual}")]
TypeMismatch { expected: String, actual: String },
#[error("unsupported feature: {0}")]
UnsupportedFeature(String),
#[error("constraint violation: {0}")]
ConstraintViolation(String),
#[error("store error: {0}")]
Store(#[from] StoreError),
#[error("json error: {0}")]
Json(#[from] serde_json::Error),
}
pub type Result<T> = std::result::Result<T, QueryError>;