use crate::base::database::ColumnType;
use thiserror::Error;
#[derive(Error, Debug, PartialEq, Eq)]
pub enum OwnedColumnError {
#[error("Can not perform type casting from {from_type:?} to {to_type:?}")]
TypeCastError {
from_type: ColumnType,
to_type: ColumnType,
},
#[error("Error in converting scalars to a given column type: {0}")]
ScalarConversionError(String),
#[error("Unsupported operation: {0}")]
Unsupported(String),
}
pub type OwnedColumnResult<T> = core::result::Result<T, OwnedColumnError>;