Struct sea_schema::mysql::def::ColumnInfo
source · [−]pub struct ColumnInfo {
pub name: String,
pub col_type: ColumnType,
pub null: bool,
pub key: ColumnKey,
pub default: Option<ColumnDefault>,
pub extra: ColumnExtra,
pub expression: Option<ColumnExpression>,
pub comment: String,
}
Available on crate features
mysql
and def
only.Fields
name: String
The name of the column
col_type: ColumnType
The type of the column with additional definitions, e.g. precision, length
null: bool
Can this column contains null
key: ColumnKey
Is this column indexed
default: Option<ColumnDefault>
Default value expression for this column, if any
extra: ColumnExtra
Extra definitions for this column, e.g. auto_increment
expression: Option<ColumnExpression>
The generation expression if this is a generated column
comment: String
User comments
Implementations
sourceimpl ColumnInfo
impl ColumnInfo
pub fn write(&self) -> ColumnDef
Available on crate feature
writer
only.pub fn write_col_type(&self, col_def: ColumnDef) -> ColumnDef
Available on crate feature
writer
only.pub fn write_num_attr(
&self,
col_def: ColumnDef,
num_attr: &NumericAttr
) -> ColumnDef
Available on crate feature
writer
only.pub fn write_str_attr(
&self,
col_def: ColumnDef,
str_attr: &StringAttr
) -> ColumnDef
Available on crate feature
writer
only.Trait Implementations
sourceimpl Clone for ColumnInfo
impl Clone for ColumnInfo
sourcefn clone(&self) -> ColumnInfo
fn clone(&self) -> ColumnInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ColumnInfo
impl Debug for ColumnInfo
sourceimpl PartialEq<ColumnInfo> for ColumnInfo
impl PartialEq<ColumnInfo> for ColumnInfo
sourcefn eq(&self, other: &ColumnInfo) -> bool
fn eq(&self, other: &ColumnInfo) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ColumnInfo) -> bool
fn ne(&self, other: &ColumnInfo) -> bool
This method tests for !=
.
impl StructuralPartialEq for ColumnInfo
Auto Trait Implementations
impl RefUnwindSafe for ColumnInfo
impl Send for ColumnInfo
impl Sync for ColumnInfo
impl Unpin for ColumnInfo
impl UnwindSafe for ColumnInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more