pub enum SqlValue {
Bool(Option<bool>),
Int(Option<i32>),
BigInt(Option<i64>),
Float(Option<f32>),
Double(Option<f64>),
Text(Option<String>),
BpChar(Option<String>),
Bytes(Option<Vec<u8>>),
Json(Option<Box<Value>>),
Timestamp(Option<DateTime<Utc>>),
NaiveTimestamp(Option<NaiveDateTime>),
Uuid(Option<Uuid>),
}Expand description
A typed value bound to one SQL parameter.
Variants§
Bool(Option<bool>)
Int(Option<i32>)
BigInt(Option<i64>)
Float(Option<f32>)
Double(Option<f64>)
Text(Option<String>)
BpChar(Option<String>)
PostgreSQL fixed-width character value (bpchar), including typed NULL.
Other engines bind the exact string as ordinary text.
Bytes(Option<Vec<u8>>)
Json(Option<Box<Value>>)
Timestamp(Option<DateTime<Utc>>)
Timezone-aware timestamp (PostgreSQL TIMESTAMPTZ).
NaiveTimestamp(Option<NaiveDateTime>)
UTC wall-clock timestamp (PostgreSQL TIMESTAMP WITHOUT TIME ZONE).
Uuid(Option<Uuid>)
Implementations§
Trait Implementations§
Source§impl From<NaiveDateTime> for SqlValue
impl From<NaiveDateTime> for SqlValue
Source§fn from(value: NaiveDateTime) -> Self
fn from(value: NaiveDateTime) -> Self
Converts to this type from the input type.
Source§impl From<Option<NaiveDateTime>> for SqlValue
impl From<Option<NaiveDateTime>> for SqlValue
Source§fn from(value: Option<NaiveDateTime>) -> Self
fn from(value: Option<NaiveDateTime>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for SqlValue
Auto Trait Implementations§
impl Freeze for SqlValue
impl RefUnwindSafe for SqlValue
impl Send for SqlValue
impl Sync for SqlValue
impl Unpin for SqlValue
impl UnsafeUnpin for SqlValue
impl UnwindSafe for SqlValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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