pub enum DatabaseValue {
}Variants§
Null
String(String)
StringOpt(Option<String>)
Bool(bool)
BoolOpt(Option<bool>)
Number(i64)
NumberOpt(Option<i64>)
UNumber(u64)
UNumberOpt(Option<u64>)
Real(f64)
RealOpt(Option<f64>)
NowAdd(String)
Now
DateTime(NaiveDateTime)
Implementations§
Trait Implementations§
Source§impl Clone for DatabaseValue
impl Clone for DatabaseValue
Source§fn clone(&self) -> DatabaseValue
fn clone(&self) -> DatabaseValue
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseValue
impl Debug for DatabaseValue
Source§impl Expression for DatabaseValue
impl Expression for DatabaseValue
fn expression_type(&self) -> ExpressionType<'_>
fn values(&self) -> Option<Vec<&DatabaseValue>>
fn is_null(&self) -> bool
fn params(&self) -> Option<Vec<&DatabaseValue>>
Source§impl From<&String> for DatabaseValue
impl From<&String> for DatabaseValue
Source§impl From<&str> for DatabaseValue
impl From<&str> for DatabaseValue
Source§impl From<DatabaseValue> for MySqlDatabaseValue
impl From<DatabaseValue> for MySqlDatabaseValue
Source§fn from(value: DatabaseValue) -> Self
fn from(value: DatabaseValue) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseValue> for PgDatabaseValue
impl From<DatabaseValue> for PgDatabaseValue
Source§fn from(value: DatabaseValue) -> Self
fn from(value: DatabaseValue) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseValue> for PgDatabaseValue
impl From<DatabaseValue> for PgDatabaseValue
Source§fn from(value: DatabaseValue) -> Self
fn from(value: DatabaseValue) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseValue> for RusqliteDatabaseValue
impl From<DatabaseValue> for RusqliteDatabaseValue
Source§fn from(value: DatabaseValue) -> Self
fn from(value: DatabaseValue) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseValue> for SqliteDatabaseValue
impl From<DatabaseValue> for SqliteDatabaseValue
Source§fn from(value: DatabaseValue) -> Self
fn from(value: DatabaseValue) -> Self
Converts to this type from the input type.
Source§impl From<String> for DatabaseValue
impl From<String> for DatabaseValue
Source§impl From<Value> for DatabaseValue
impl From<Value> for DatabaseValue
Source§impl From<bool> for DatabaseValue
impl From<bool> for DatabaseValue
Source§impl From<f32> for DatabaseValue
impl From<f32> for DatabaseValue
Source§impl From<f64> for DatabaseValue
impl From<f64> for DatabaseValue
Source§impl From<i16> for DatabaseValue
impl From<i16> for DatabaseValue
Source§impl From<i32> for DatabaseValue
impl From<i32> for DatabaseValue
Source§impl From<i64> for DatabaseValue
impl From<i64> for DatabaseValue
Source§impl From<i8> for DatabaseValue
impl From<i8> for DatabaseValue
Source§impl From<isize> for DatabaseValue
impl From<isize> for DatabaseValue
Source§impl From<u16> for DatabaseValue
impl From<u16> for DatabaseValue
Source§impl From<u32> for DatabaseValue
impl From<u32> for DatabaseValue
Source§impl From<u64> for DatabaseValue
impl From<u64> for DatabaseValue
Source§impl From<u8> for DatabaseValue
impl From<u8> for DatabaseValue
Source§impl From<usize> for DatabaseValue
impl From<usize> for DatabaseValue
Source§impl<'a> FromSql<'a> for DatabaseValue
impl<'a> FromSql<'a> for DatabaseValue
Source§fn from_sql(
ty: &Type,
raw: &'a [u8],
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql( ty: &Type, raw: &'a [u8], ) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type in its binary format. Read moreSource§fn from_sql_nullable(
ty: &Type,
raw: Option<&'a [u8]>,
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql_nullable( ty: &Type, raw: Option<&'a [u8]>, ) -> Result<Self, Box<dyn Error + Sync + Send>>
A convenience function that delegates to
from_sql and from_sql_null depending on the
value of raw.Source§impl PartialEq for DatabaseValue
impl PartialEq for DatabaseValue
Source§impl TryFrom<DatabaseValue> for i32
impl TryFrom<DatabaseValue> for i32
Source§type Error = TryFromError
type Error = TryFromError
The type returned in the event of a conversion error.
Source§impl TryFrom<DatabaseValue> for u64
impl TryFrom<DatabaseValue> for u64
Source§type Error = TryFromError
type Error = TryFromError
The type returned in the event of a conversion error.
impl StructuralPartialEq for DatabaseValue
Auto Trait Implementations§
impl Freeze for DatabaseValue
impl RefUnwindSafe for DatabaseValue
impl Send for DatabaseValue
impl Sync for DatabaseValue
impl Unpin for DatabaseValue
impl UnwindSafe for DatabaseValue
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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