use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Eq, Error)]
pub enum LineageError {
#[error("SQL parse error: {0}")]
Parse(String),
#[error("multi-statement SQL is not supported")]
MultiStatement,
#[error("unresolved column `{column}`: {reason}")]
UnresolvedColumn {
column: String,
reason: String,
},
#[error("unknown table `{table}`")]
UnknownTable {
table: String,
},
#[error("query nesting depth limit exceeded")]
DepthLimitExceeded,
#[error("circular CTE reference: `{cte}`")]
CircularReference {
cte: String,
},
#[error("column count mismatch for `{target}`: expected {expected}, found {found}")]
ColumnCountMismatch {
target: String,
expected: usize,
found: usize,
},
}