use alloc::string::String;
use super::error::DecodeError;
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum ConversionError {
#[error("Column '{0}' not found in table schema")]
ColumnNotFound(String),
#[error("Table name mismatch: expected '{expected}', got '{actual}'")]
TableMismatch {
expected: String,
actual: String,
},
#[error("Table '{0}' not found in schema")]
TableNotFound(String),
#[error("Missing columns in event")]
MissingColumns,
#[error("Missing {0} data for {1} operation")]
MissingData(&'static str, &'static str),
#[error("Old data not available (check replica identity setting)")]
MissingOldData,
#[error("Unsupported value type for column '{0}'")]
UnsupportedType(String),
#[error("Event type '{0}' cannot be converted to the requested operation")]
InvalidEventType(String),
#[error("Operation '{0}' cannot be converted to the requested type")]
InvalidOperation(String),
#[error("Decoder failed: {0}")]
Decode(#[from] DecodeError),
}