pub struct ColumnSchema {
pub name: &'static str,
pub column_type: ColumnType,
pub nullable: bool,
pub primary_key: bool,
pub unique: bool,
pub default: Option<&'static str>,
pub check: Option<&'static str>,
pub choices: Option<Vec<&'static str>>,
pub references: Option<ForeignKey>,
pub auto_now_add: bool,
pub auto_now: bool,
}Expand description
Metadata for one table column.
Fields§
§name: &'static str§column_type: ColumnType§nullable: bool§primary_key: bool§unique: bool§default: Option<&'static str>§check: Option<&'static str>§choices: Option<Vec<&'static str>>§references: Option<ForeignKey>§auto_now_add: bool§auto_now: boolImplementations§
Source§impl ColumnSchema
impl ColumnSchema
pub fn new(name: &'static str, column_type: ColumnType, nullable: bool) -> Self
Trait Implementations§
Source§impl Clone for ColumnSchema
impl Clone for ColumnSchema
Source§fn clone(&self) -> ColumnSchema
fn clone(&self) -> ColumnSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnSchema
impl Debug for ColumnSchema
impl Eq for ColumnSchema
Source§impl PartialEq for ColumnSchema
impl PartialEq for ColumnSchema
impl StructuralPartialEq for ColumnSchema
Auto Trait Implementations§
impl Freeze for ColumnSchema
impl RefUnwindSafe for ColumnSchema
impl Send for ColumnSchema
impl Sync for ColumnSchema
impl Unpin for ColumnSchema
impl UnsafeUnpin for ColumnSchema
impl UnwindSafe for ColumnSchema
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