pub struct ColumnDef {
pub catalog: String,
pub schema: String,
pub table: String,
pub org_table: String,
pub name: String,
pub org_name: String,
pub charset: u16,
pub column_length: u32,
pub column_type: FieldType,
pub flags: u16,
pub decimals: u8,
}Expand description
Column definition from a result set.
Fields§
§catalog: StringCatalog name (always “def”)
schema: StringSchema (database) name
table: StringTable name (or alias)
org_table: StringOriginal table name
name: StringColumn name (or alias)
org_name: StringOriginal column name
charset: u16Character set number
column_length: u32Column length
column_type: FieldTypeColumn type
flags: u16Column flags
decimals: u8Number of decimals
Implementations§
Source§impl ColumnDef
impl ColumnDef
Sourcepub const fn is_not_null(&self) -> bool
pub const fn is_not_null(&self) -> bool
Check if the column is NOT NULL.
Sourcepub const fn is_primary_key(&self) -> bool
pub const fn is_primary_key(&self) -> bool
Check if the column is a primary key.
Sourcepub const fn is_unsigned(&self) -> bool
pub const fn is_unsigned(&self) -> bool
Check if the column is unsigned.
Sourcepub const fn is_auto_increment(&self) -> bool
pub const fn is_auto_increment(&self) -> bool
Check if the column is auto-increment.
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).