pub struct AlterColumnChanges {
pub new_name: Option<String>,
pub new_ty: Option<Type>,
pub new_not_null: Option<bool>,
pub new_auto_increment: Option<bool>,
}Expand description
A statement to alter a column in a table.
Fields§
§new_name: Option<String>New name for the column (if renaming).
new_ty: Option<Type>New type information.
new_not_null: Option<bool>New nullability constraint.
new_auto_increment: Option<bool>New auto increment behavior.
Implementations§
Source§impl AlterColumnChanges
impl AlterColumnChanges
Sourcepub fn from_diff(previous: &Column, next: &Column) -> Self
pub fn from_diff(previous: &Column, next: &Column) -> Self
Computes the set of changes between two column definitions.
Each field is Some only when the corresponding property differs
between previous and next.
Sourcepub fn split(self) -> Vec<Self>
pub fn split(self) -> Vec<Self>
Splits up this set of changes into a Vec of individual changes.
Sourcepub fn has_type_change(&self) -> bool
pub fn has_type_change(&self) -> bool
Returns true if any type-level property changed (type, nullability, or auto-increment).
Trait Implementations§
Source§impl Clone for AlterColumnChanges
impl Clone for AlterColumnChanges
Source§fn clone(&self) -> AlterColumnChanges
fn clone(&self) -> AlterColumnChanges
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 moreAuto Trait Implementations§
impl Freeze for AlterColumnChanges
impl RefUnwindSafe for AlterColumnChanges
impl Send for AlterColumnChanges
impl Sync for AlterColumnChanges
impl Unpin for AlterColumnChanges
impl UnwindSafe for AlterColumnChanges
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