proof_of_sql/base/database/
owned_column_error.rsuse crate::base::database::ColumnType;
use alloc::string::String;
use snafu::Snafu;
#[derive(Snafu, Debug, PartialEq, Eq)]
pub enum OwnedColumnError {
#[snafu(display("Can not perform type casting from {from_type:?} to {to_type:?}"))]
TypeCastError {
from_type: ColumnType,
to_type: ColumnType,
},
#[snafu(display("Error in converting scalars to a given column type: {error}"))]
ScalarConversionError {
error: String,
},
#[snafu(display("Unsupported operation: {error}"))]
Unsupported {
error: String,
},
}
#[derive(Snafu, Debug, PartialEq, Eq)]
pub(crate) enum ColumnCoercionError {
#[snafu(display("Overflow when coercing a column"))]
Overflow,
#[snafu(display("Invalid type coercion"))]
InvalidTypeCoercion,
}
pub type OwnedColumnResult<T> = core::result::Result<T, OwnedColumnError>;