pub enum Value {
}Variants
Bool(bool)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
I128(i128)
F64(f64)
Decimal(Decimal)
Str(String)
Bytea(Vec<u8>)
Date(NaiveDate)
Timestamp(NaiveDateTime)
Time(NaiveTime)
Interval(Interval)
Uuid(u128)
Map(HashMap<String, Value>)
List(Vec<Value>)
Null
Implementations
sourceimpl Value
impl Value
pub fn parse_json_map(value: &str) -> Result<Value>
pub fn parse_json_list(value: &str) -> Result<Value>
sourceimpl Value
impl Value
pub fn is_zero(&self) -> bool
pub fn get_type(&self) -> Option<DataType>
pub fn validate_type(&self, data_type: &DataType) -> Result<()>
pub fn validate_null(&self, nullable: bool) -> Result<()>
pub fn cast(&self, data_type: &DataType) -> Result<Self>
pub fn concat(&self, other: &Value) -> Value
pub fn add(&self, other: &Value) -> Result<Value>
pub fn subtract(&self, other: &Value) -> Result<Value>
pub fn multiply(&self, other: &Value) -> Result<Value>
pub fn divide(&self, other: &Value) -> Result<Value>
pub fn modulo(&self, other: &Value) -> Result<Value>
pub fn is_null(&self) -> bool
pub fn unary_plus(&self) -> Result<Value>
pub fn unary_minus(&self) -> Result<Value>
pub fn unary_factorial(&self) -> Result<Value>
pub fn like(&self, other: &Value, case_sensitive: bool) -> Result<Value>
pub fn extract(&self, date_type: &DateTimeField) -> Result<Value>
pub fn sqrt(&self) -> Result<Value>
sourcepub fn to_cmp_be_bytes(&self) -> Result<Vec<u8>>
pub fn to_cmp_be_bytes(&self) -> Result<Vec<u8>>
Value to Big-Endian for comparison purpose
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<Literal<'_>> for Value
impl PartialEq<Literal<'_>> for Value
sourceimpl PartialEq<Value> for Decimal
impl PartialEq<Value> for Decimal
sourceimpl PartialEq<Value> for Value
impl PartialEq<Value> for Value
sourceimpl PartialEq<Value> for f64
impl PartialEq<Value> for f64
sourceimpl PartialEq<Value> for i128
impl PartialEq<Value> for i128
sourceimpl PartialEq<Value> for i16
impl PartialEq<Value> for i16
sourceimpl PartialEq<Value> for i32
impl PartialEq<Value> for i32
sourceimpl PartialEq<Value> for i64
impl PartialEq<Value> for i64
sourceimpl PartialEq<Value> for i8
impl PartialEq<Value> for i8
sourceimpl PartialOrd<Literal<'_>> for Value
impl PartialOrd<Literal<'_>> for Value
sourcefn partial_cmp(&self, other: &Literal<'_>) -> Option<Ordering>
fn partial_cmp(&self, other: &Literal<'_>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for Decimal
impl PartialOrd<Value> for Decimal
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for f64
impl PartialOrd<Value> for f64
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for i128
impl PartialOrd<Value> for i128
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for i16
impl PartialOrd<Value> for i16
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for i32
impl PartialOrd<Value> for i32
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for i64
impl PartialOrd<Value> for i64
sourcefn partial_cmp(&self, rhs: &Value) -> Option<Ordering>
fn partial_cmp(&self, rhs: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Value> for i8
impl PartialOrd<Value> for i8
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl TryFrom<&Value> for NaiveDateTime
impl TryFrom<&Value> for NaiveDateTime
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more