pub struct ColumnDef {
pub table: TableName,
pub name: ColumnName,
pub comment: Option<String>,
pub specification: ColumnSpecification,
pub stat: Option<ColumnStat>,
}
Fields§
§table: TableName
§name: ColumnName
§comment: Option<String>
§specification: ColumnSpecification
§stat: Option<ColumnStat>
Implementations§
Source§impl ColumnDef
impl ColumnDef
Sourcepub fn is_autoincrement(&self) -> bool
pub fn is_autoincrement(&self) -> bool
check all the column constraint if any has AutoIncrement
Sourcepub fn autoincrement_sequence_name(&self) -> Option<&String>
pub fn autoincrement_sequence_name(&self) -> Option<&String>
get the sequnce name of this autoincrement column
Sourcepub fn default_is_generated_uuid(&self) -> bool
pub fn default_is_generated_uuid(&self) -> bool
check if any of the column constraint default is generated from uuid
pub fn is_not_null(&self) -> bool
pub fn get_sql_type(&self) -> SqlType
pub fn cast_as(&self) -> Option<SqlType>
pub fn has_generated_default(&self) -> bool
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