#[derive(Debug, thiserror::Error)]
pub enum AppError {
#[error("Database connection error: {0}")]
Connection(String),
#[error("Query blocked: only SELECT, SHOW, DESC, DESCRIBE, USE queries are allowed in read-only mode")]
ReadOnlyViolation,
#[error("Operation forbidden: LOAD_FILE() is not allowed for security reasons")]
LoadFileBlocked,
#[error("Operation forbidden: SELECT INTO OUTFILE/DUMPFILE is not allowed for security reasons")]
IntoOutfileBlocked,
#[error("Query blocked: only single statements are allowed")]
MultiStatement,
#[error("Invalid identifier '{0}': must not be empty, whitespace-only, or contain control characters")]
InvalidIdentifier(String),
#[error("Database error: {0}")]
Query(String),
#[error("Table not found: {0}")]
TableNotFound(String),
}