pub struct ColumnDef {
pub name: String,
pub data_type: DataType,
pub nullable: bool,
pub default: Option<Expr>,
pub primary_key: bool,
pub unique: bool,
pub autoincrement: bool,
}Expand description
A column definition for CREATE TABLE.
Fields§
§name: StringColumn name.
data_type: DataTypeData type.
nullable: boolWhether the column is nullable.
default: Option<Expr>Default value expression.
primary_key: boolWhether this is a primary key.
unique: boolWhether this column is unique.
autoincrement: boolWhether this column auto-increments.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ColumnDef
Auto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin 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