pub struct Column {
pub column_name: String,
pub datatype: DataType,
pub is_pk: bool,
pub not_null: bool,
pub is_unique: bool,
pub default: Option<Value>,
}Expand description
The schema for each SQL column in every table.
Per-column index state moved to Table::secondary_indexes in Phase 3e —
a single Column describes the declared schema (name, type, constraints)
and nothing more.
Fields§
§column_name: String§datatype: DataType§is_pk: bool§not_null: bool§is_unique: bool§default: Option<Value>Literal value to substitute when this column is omitted from an
INSERT. Restricted to literal expressions at CREATE TABLE time.
None means “no DEFAULT declared”; an INSERT that omits the column
gets Value::Null instead.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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