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) -> Self
pub fn not_null(self) -> Self
pub fn default(self, value: &str) -> Self
pub fn auto_increment(self) -> Self
pub fn unique(self) -> Self
pub fn comment(self, comment: &str) -> Self
pub fn length(self, len: usize) -> Self
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