#[non_exhaustive]pub struct ColumnEntity {Show 18 fields
pub name: String,
pub data_type: String,
pub charset: String,
pub collation: String,
pub length: i64,
pub precision: i32,
pub scale: i32,
pub fractional_seconds_precision: i32,
pub array: bool,
pub array_length: i32,
pub nullable: bool,
pub auto_generated: bool,
pub udt: bool,
pub custom_features: Option<Struct>,
pub set_values: Vec<String>,
pub comment: String,
pub ordinal_position: i32,
pub default_value: String,
/* private fields */
}Expand description
Column is not used as an independent entity, it is retrieved as part of a Table entity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringColumn name.
data_type: StringColumn data type.
charset: StringCharset override - instead of table level charset.
collation: StringCollation override - instead of table level collation.
length: i64Column length - e.g. varchar (50).
precision: i32Column precision - when relevant.
scale: i32Column scale - when relevant.
fractional_seconds_precision: i32Column fractional second precision - used for timestamp based datatypes.
array: boolIs the column of array type.
array_length: i32If the column is array, of which length.
nullable: boolIs the column nullable.
auto_generated: boolIs the column auto-generated/identity.
udt: boolIs the column a UDT.
custom_features: Option<Struct>Custom engine specific features.
set_values: Vec<String>Specifies the list of values allowed in the column. Only used for set data type.
comment: StringComment associated with the column.
ordinal_position: i32Column order in the table.
default_value: StringDefault value of the column.
Implementations§
Source§impl ColumnEntity
impl ColumnEntity
pub fn new() -> Self
Sourcepub fn set_data_type<T: Into<String>>(self, v: T) -> Self
pub fn set_data_type<T: Into<String>>(self, v: T) -> Self
Sets the value of data_type.
Sourcepub fn set_charset<T: Into<String>>(self, v: T) -> Self
pub fn set_charset<T: Into<String>>(self, v: T) -> Self
Sets the value of charset.
Sourcepub fn set_collation<T: Into<String>>(self, v: T) -> Self
pub fn set_collation<T: Into<String>>(self, v: T) -> Self
Sets the value of collation.
Sourcepub fn set_length<T: Into<i64>>(self, v: T) -> Self
pub fn set_length<T: Into<i64>>(self, v: T) -> Self
Sets the value of length.
Sourcepub fn set_precision<T: Into<i32>>(self, v: T) -> Self
pub fn set_precision<T: Into<i32>>(self, v: T) -> Self
Sets the value of precision.
Sourcepub fn set_fractional_seconds_precision<T: Into<i32>>(self, v: T) -> Self
pub fn set_fractional_seconds_precision<T: Into<i32>>(self, v: T) -> Self
Sets the value of fractional_seconds_precision.
Sourcepub fn set_array_length<T: Into<i32>>(self, v: T) -> Self
pub fn set_array_length<T: Into<i32>>(self, v: T) -> Self
Sets the value of array_length.
Sourcepub fn set_nullable<T: Into<bool>>(self, v: T) -> Self
pub fn set_nullable<T: Into<bool>>(self, v: T) -> Self
Sets the value of nullable.
Sourcepub fn set_auto_generated<T: Into<bool>>(self, v: T) -> Self
pub fn set_auto_generated<T: Into<bool>>(self, v: T) -> Self
Sets the value of auto_generated.
Sourcepub fn set_custom_features<T>(self, v: T) -> Self
pub fn set_custom_features<T>(self, v: T) -> Self
Sets the value of custom_features.
Sourcepub fn set_or_clear_custom_features<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_features<T>(self, v: Option<T>) -> Self
Sets or clears the value of custom_features.
Sourcepub fn set_set_values<T, V>(self, v: T) -> Self
pub fn set_set_values<T, V>(self, v: T) -> Self
Sets the value of set_values.
Sourcepub fn set_comment<T: Into<String>>(self, v: T) -> Self
pub fn set_comment<T: Into<String>>(self, v: T) -> Self
Sets the value of comment.
Sourcepub fn set_ordinal_position<T: Into<i32>>(self, v: T) -> Self
pub fn set_ordinal_position<T: Into<i32>>(self, v: T) -> Self
Sets the value of ordinal_position.
Sourcepub fn set_default_value<T: Into<String>>(self, v: T) -> Self
pub fn set_default_value<T: Into<String>>(self, v: T) -> Self
Sets the value of default_value.
Trait Implementations§
Source§impl Clone for ColumnEntity
impl Clone for ColumnEntity
Source§fn clone(&self) -> ColumnEntity
fn clone(&self) -> ColumnEntity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more