pub struct ColumnInfo {Show 13 fields
pub name: String,
pub db_type: String,
pub normalized_type: NormalizedType,
pub nullable: bool,
pub default: Option<String>,
pub auto_increment: bool,
pub is_primary_key: bool,
pub is_unique: bool,
pub comment: Option<String>,
pub max_length: Option<i32>,
pub precision: Option<i32>,
pub scale: Option<i32>,
pub enum_name: Option<String>,
}Expand description
Information about a column.
Fields§
§name: StringColumn name.
db_type: StringDatabase-specific type name.
normalized_type: NormalizedTypeNormalized type for schema generation.
nullable: boolWhether the column is nullable.
default: Option<String>Default value expression.
auto_increment: boolWhether this is an auto-increment/serial column.
is_primary_key: boolWhether this is part of primary key.
is_unique: boolWhether this column has a unique constraint.
comment: Option<String>Column comment.
max_length: Option<i32>Character maximum length (for varchar, etc.).
precision: Option<i32>Numeric precision.
scale: Option<i32>Numeric scale.
enum_name: Option<String>Enum type name (if applicable).
Trait Implementations§
Source§impl Clone for ColumnInfo
impl Clone for ColumnInfo
Source§fn clone(&self) -> ColumnInfo
fn clone(&self) -> ColumnInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 ColumnInfo
impl Debug for ColumnInfo
Source§impl Default for ColumnInfo
impl Default for ColumnInfo
Source§fn default() -> ColumnInfo
fn default() -> ColumnInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColumnInfo
impl<'de> Deserialize<'de> for ColumnInfo
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
Auto Trait Implementations§
impl Freeze for ColumnInfo
impl RefUnwindSafe for ColumnInfo
impl Send for ColumnInfo
impl Sync for ColumnInfo
impl Unpin for ColumnInfo
impl UnwindSafe for ColumnInfo
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