pub enum AlterAction {
AddColumn {
name: String,
type_name: String,
required: bool,
},
DropColumn {
name: String,
},
AddIndex {
column: String,
},
AddUnique {
column: String,
},
}Expand description
An individual ALTER TABLE action.
Variants§
AddColumn
DropColumn
AddIndex
alter <Table> add index .<column> — creates a B+Tree index on
column. No-op if the index already exists.
AddUnique
alter <Table> add unique .<column> — creates a UNIQUE B+Tree
index on column. Scans existing data first and fails if any
duplicate (non-null) value is present. Errors if the column is
already indexed (no in-place upgrade).
Trait Implementations§
Source§impl Clone for AlterAction
impl Clone for AlterAction
Source§fn clone(&self) -> AlterAction
fn clone(&self) -> AlterAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AlterAction
impl Debug for AlterAction
Source§impl PartialEq for AlterAction
impl PartialEq for AlterAction
Source§fn eq(&self, other: &AlterAction) -> bool
fn eq(&self, other: &AlterAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AlterAction
Auto Trait Implementations§
impl Freeze for AlterAction
impl RefUnwindSafe for AlterAction
impl Send for AlterAction
impl Sync for AlterAction
impl Unpin for AlterAction
impl UnsafeUnpin for AlterAction
impl UnwindSafe for AlterAction
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