pub struct ColumnDef {
pub name: String,
pub ty: ColumnTypeName,
pub nullable: bool,
pub default: Option<Expr>,
pub auto_increment: bool,
pub is_primary_key: bool,
}Fields§
§name: String§ty: ColumnTypeName§nullable: bool§default: Option<Expr>DEFAULT <expr> literal supplied at CREATE TABLE. Engine
evaluates this once (with an empty row) and caches the resulting
Value on the column schema.
auto_increment: boolMySQL-style AUTO_INCREMENT — the engine maintains a counter
per such column and fills the slot when INSERT leaves it
unbound (omitted from a column-list INSERT or explicitly NULL).
is_primary_key: boolv7.9.13 — inline PRIMARY KEY column constraint. mailrs
migration follow-up F1. Implies NOT NULL. Engine creates
an implicit BTree index named <table>_pkey over this
column at CREATE TABLE time, satisfying the parent-side
index requirement for any FOREIGN KEY pointing at it.
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 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