pub enum Autoincrement<T>{
Auto,
Value(T),
}Expand description
Represents an autoincrement value, which can either be automatically generated or explicitly provided.
This is used when providing values in crate::prelude::InsertRecord if a column is defined as autoincrement.
If the value is set to Autoincrement::Auto, the DBMS will automatically generate the next value for that column.
If it is set to Autoincrement::Value, the provided value will be used instead.
Variants§
Auto
Indicates that the value should be automatically generated by the DBMS.
Value(T)
Indicates that the provided value should be used for the autoincrement column.
Once inserted, the next value for the autoincrement column will be provided value + 1.
Implementations§
Source§impl<T> Autoincrement<T>
impl<T> Autoincrement<T>
Sourcepub fn into_option(self) -> Option<T>
pub fn into_option(self) -> Option<T>
Converts the Autoincrement value into an Option<T>, where Autoincrement::Auto is represented as Option::None,
and Autoincrement::Value is represented as Option::Some.
Trait Implementations§
Source§impl<T> Clone for Autoincrement<T>
impl<T> Clone for Autoincrement<T>
Source§fn clone(&self) -> Autoincrement<T>
fn clone(&self) -> Autoincrement<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more