pub struct ColumnDef {
pub name: String,
pub col_type: String,
pub length: Option<usize>,
pub precision: Option<(u32, u32)>,
pub nullable: bool,
pub default: Option<String>,
pub auto_increment: bool,
pub unique: bool,
pub comment: Option<String>,
}Fields§
§name: String§col_type: String§length: Option<usize>§precision: Option<(u32, u32)>§nullable: bool§default: Option<String>§auto_increment: bool§unique: bool§comment: Option<String>Implementations§
Source§impl ColumnDef
impl ColumnDef
pub fn new(name: &str, col_type: &str) -> ColumnDef
pub fn not_null(self) -> ColumnDef
pub fn default(self, value: &str) -> ColumnDef
pub fn auto_increment(self) -> ColumnDef
pub fn unique(self) -> ColumnDef
pub fn comment(self, comment: &str) -> ColumnDef
pub fn length(self, len: usize) -> ColumnDef
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin for ColumnDef
impl UnsafeUnpin for ColumnDef
impl UnwindSafe for ColumnDef
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