pub enum NumericCast {
SmallInteger,
Integer,
BigInteger,
Real,
DoublePrecision,
Numeric {
precision: Option<u32>,
scale: Option<i32>,
},
}Expand description
An immutable builtin numeric conversion selected from resolved source and destination identities.
Variants§
Implementations§
Source§impl NumericCast
impl NumericCast
Sourcepub fn select(source: &ColumnType, target: &ColumnType) -> Option<Self>
pub fn select(source: &ColumnType, target: &ColumnType) -> Option<Self>
Select only builtin numeric identities. Domains, OID aliases, containers and catalog-defined types retain their distinct coercion paths.
Sourcepub fn evaluate_with_catalog(
self,
value: &Value,
source_name: &str,
engine: Option<&dyn EngineHook>,
control: &ProductionControl<'_>,
) -> Result<Produced<Value>, SQLError>
pub fn evaluate_with_catalog( self, value: &Value, source_name: &str, engine: Option<&dyn EngineHook>, control: &ProductionControl<'_>, ) -> Result<Produced<Value>, SQLError>
Execute a retained conversion with the invoking catalog hook. Type resolution is already complete, but domain adapters still observe each value before the builtin kernel.
Trait Implementations§
Source§impl Clone for NumericCast
impl Clone for NumericCast
impl Copy for NumericCast
Auto Trait Implementations§
impl Freeze for NumericCast
impl RefUnwindSafe for NumericCast
impl Send for NumericCast
impl Sync for NumericCast
impl Unpin for NumericCast
impl UnsafeUnpin for NumericCast
impl UnwindSafe for NumericCast
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more