use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("SQLite error: {0}")]
Sqlite(#[from] rusqlite::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("Cypher error: {0}")]
Cypher(String),
#[error("GraphQLite extension not found: {0}")]
ExtensionNotFound(String),
#[error("Type error: expected {expected}, got {actual}")]
TypeError {
expected: &'static str,
actual: String,
},
#[error("Column not found: {0}")]
ColumnNotFound(String),
#[error("Graph '{0}' already exists")]
GraphExists(String),
#[error("Graph '{name}' not found. Available: {available:?}")]
GraphNotFound {
name: String,
available: Vec<String>,
},
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
}