pub enum ColumnUpdate<V> {
Unchanged,
Null,
Set(V),
}Expand description
A column in an update that can be null: left as it is (the default),
set to null, or set to a value. A column that can’t be null is an
Option in an update instead, None leaving it.
Variants§
Unchanged
Leaves the column as it is.
Null
Sets the column to null.
Set(V)
Sets the column to the value.
Implementations§
Source§impl<V: ZeroValue> ColumnUpdate<V>
impl<V: ZeroValue> ColumnUpdate<V>
Sourcepub fn to_zero_value(&self) -> Option<Value>
pub fn to_zero_value(&self) -> Option<Value>
What the update writes to the column; None when it leaves it. For
generated code.
Trait Implementations§
Source§impl<V: Clone> Clone for ColumnUpdate<V>
impl<V: Clone> Clone for ColumnUpdate<V>
Source§impl<V: Debug> Debug for ColumnUpdate<V>
impl<V: Debug> Debug for ColumnUpdate<V>
Source§impl<V> Default for ColumnUpdate<V>
impl<V> Default for ColumnUpdate<V>
impl<V: Eq> Eq for ColumnUpdate<V>
Source§impl<V> From<Option<V>> for ColumnUpdate<V>
impl<V> From<Option<V>> for ColumnUpdate<V>
Source§impl<V: Hash> Hash for ColumnUpdate<V>
impl<V: Hash> Hash for ColumnUpdate<V>
Source§impl<V: PartialEq> PartialEq for ColumnUpdate<V>
impl<V: PartialEq> PartialEq for ColumnUpdate<V>
impl<V: PartialEq> StructuralPartialEq for ColumnUpdate<V>
Auto Trait Implementations§
impl<V> Forget for ColumnUpdate<V>
impl<V> Freeze for ColumnUpdate<V>where
V: Freeze,
impl<V> Move for ColumnUpdate<V>
impl<V> RefUnwindSafe for ColumnUpdate<V>where
V: RefUnwindSafe,
impl<V> Send for ColumnUpdate<V>where
V: Send,
impl<V> Sync for ColumnUpdate<V>where
V: Sync,
impl<V> Unpin for ColumnUpdate<V>where
V: Unpin,
impl<V> UnsafeUnpin for ColumnUpdate<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ColumnUpdate<V>where
V: UnwindSafe,
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