Trait mentat_core::SQLValueType [] [src]

pub trait SQLValueType {
    fn value_type_tag(&self) -> ValueTypeTag;
fn accommodates_integer(&self, int: i64) -> bool;
fn sql_representation(&self) -> (ValueTypeTag, Option<SQLTypeAffinity>); }

Required Methods

Return a pair of the ValueTypeTag for this value type, and the SQLTypeAffinity required to distinguish it from any other types that share the same tag.

Background: The tag alone is not enough to determine the type of a value, since multiple ValueTypes may share the same tag (for example, ValueType::Long and ValueType::Double). However, each ValueType can be determined by checking both the tag and the type's affinity.

Implementors