#[non_exhaustive]pub struct SingleColumnChange {Show 15 fields
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,
/* private fields */
}Expand description
Options to configure rule type SingleColumnChange. The rule is used to change the properties of a column.
The rule filter field can refer to one entity.
The rule scope can be one of: Column.
When using this rule, if a field is not specified than the destination column’s configuration will be the same as the one in the source column..
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.data_type: StringOptional. Column data type name.
charset: StringOptional. Charset override - instead of table level charset.
collation: StringOptional. Collation override - instead of table level collation.
length: i64Optional. Column length - e.g. 50 as in varchar (50) - when relevant.
precision: i32Optional. Column precision - e.g. 8 as in double (8,2) - when relevant.
scale: i32Optional. Column scale - e.g. 2 as in double (8,2) - when relevant.
fractional_seconds_precision: i32Optional. Column fractional seconds precision - e.g. 2 as in timestamp (2)
- when relevant.
array: boolOptional. Is the column of array type.
array_length: i32Optional. The length of the array, only relevant if the column type is an array.
nullable: boolOptional. Is the column nullable.
auto_generated: boolOptional. Is the column auto-generated/identity.
udt: boolOptional. Is the column a UDT (User-defined Type).
custom_features: Option<Struct>Optional. Custom engine specific features.
set_values: Vec<String>Optional. Specifies the list of values allowed in the column.
comment: StringOptional. Comment associated with the column.
Implementations§
Source§impl SingleColumnChange
impl SingleColumnChange
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.
Trait Implementations§
Source§impl Clone for SingleColumnChange
impl Clone for SingleColumnChange
Source§fn clone(&self) -> SingleColumnChange
fn clone(&self) -> SingleColumnChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more