pub enum PostgresInsertValue<'a, V: SQLParam, T> {
Omit,
Null,
Value(ValueWrapper<'a, V, T>),
}Expand description
Represents a value for INSERT operations that can be omitted, null, or a SQL expression
Variants§
Omit
Omit this column from the INSERT (use database default)
Null
Explicitly insert NULL
Value(ValueWrapper<'a, V, T>)
Insert a SQL expression (value, placeholder, etc.)
Implementations§
Source§impl<'a, T> PostgresInsertValue<'a, PostgresValue<'a>, T>
impl<'a, T> PostgresInsertValue<'a, PostgresValue<'a>, T>
Sourcepub fn into_owned(
self,
) -> PostgresInsertValue<'static, PostgresValue<'static>, T>
pub fn into_owned( self, ) -> PostgresInsertValue<'static, PostgresValue<'static>, T>
Converts this InsertValue to an owned version with ’static lifetime
Trait Implementations§
Source§impl<'a, V: Clone + SQLParam, T: Clone> Clone for PostgresInsertValue<'a, V, T>
impl<'a, V: Clone + SQLParam, T: Clone> Clone for PostgresInsertValue<'a, V, T>
Source§fn clone(&self) -> PostgresInsertValue<'a, V, T>
fn clone(&self) -> PostgresInsertValue<'a, V, T>
Returns a duplicate 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<'a, V: SQLParam, T> Default for PostgresInsertValue<'a, V, T>
impl<'a, V: SQLParam, T> Default for PostgresInsertValue<'a, V, T>
Source§fn default() -> PostgresInsertValue<'a, V, T>
fn default() -> PostgresInsertValue<'a, V, T>
Returns the “default value” for a type. Read more
Source§impl<'a> From<&str> for PostgresInsertValue<'a, PostgresValue<'a>, String>
impl<'a> From<&str> for PostgresInsertValue<'a, PostgresValue<'a>, String>
Source§impl<'a, T> From<Option<T>> for PostgresInsertValue<'a, PostgresValue<'a>, T>where
T: ToSQL<'a, PostgresValue<'a>>,
impl<'a, T> From<Option<T>> for PostgresInsertValue<'a, PostgresValue<'a>, T>where
T: ToSQL<'a, PostgresValue<'a>>,
Source§impl<'a, T> From<Placeholder> for PostgresInsertValue<'a, PostgresValue<'a>, T>
impl<'a, T> From<Placeholder> for PostgresInsertValue<'a, PostgresValue<'a>, T>
Source§fn from(placeholder: Placeholder) -> Self
fn from(placeholder: Placeholder) -> Self
Converts to this type from the input type.
Source§impl<'a, T> From<T> for PostgresInsertValue<'a, PostgresValue<'a>, T>where
T: TryInto<PostgresValue<'a>>,
impl<'a, T> From<T> for PostgresInsertValue<'a, PostgresValue<'a>, T>where
T: TryInto<PostgresValue<'a>>,
Auto Trait Implementations§
impl<'a, V, T> Freeze for PostgresInsertValue<'a, V, T>where
V: Freeze,
impl<'a, V, T> !RefUnwindSafe for PostgresInsertValue<'a, V, T>
impl<'a, V, T> Send for PostgresInsertValue<'a, V, T>
impl<'a, V, T> Sync for PostgresInsertValue<'a, V, T>
impl<'a, V, T> Unpin for PostgresInsertValue<'a, V, T>
impl<'a, V, T> !UnwindSafe for PostgresInsertValue<'a, V, T>
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