pub struct Column {
pub id: ColumnId,
pub name: String,
pub data_type: DataType,
pub nullable: bool,
pub is_primary: bool,
pub is_foreign: bool,
pub is_unique: bool,
pub default: Option<String>,
pub comment: String,
}Expand description
A column on a Table.
Fields§
§id: ColumnIdUnique handle within the owning model.
name: StringColumn name.
data_type: DataTypeLogical data type.
nullable: boolWhether the column admits NULL.
is_primary: booltrue when this column is part of the primary key.
is_foreign: booltrue when this column is part of (any) foreign key.
is_unique: booltrue when this column is part of a single-column UNIQUE constraint.
default: Option<String>Optional default value, rendered verbatim into DDL.
comment: StringOptional descriptive comment.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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