pub enum AlterKind {
RenameTable {
to: Vec<u8>,
},
RenameColumn {
from: Vec<u8>,
to: Vec<u8>,
},
AddColumn {
start: u32,
end: u32,
risk: AddedColumnRisk,
},
DropColumn {
name: Vec<u8>,
position: u16,
},
}Expand description
What an ALTER TABLE does, with every name already resolved.
Variants§
RenameTable
RENAME TO.
RenameColumn
RENAME COLUMN a TO b.
AddColumn
ADD COLUMN.
Fields
§
start: u32Where the definition starts in the statement’s own source.
The offsets rather than the text, for the same reason CREATE TABLE
carries an offset: the executor has the statement’s source and
slicing it there keeps the written definition - its spacing, its
case and its comments - rather than something re-rendered from the
parse.
§
risk: AddedColumnRiskWhat it would do to rows that already exist.
DropColumn
DROP COLUMN.
Trait Implementations§
impl Eq for AlterKind
impl StructuralPartialEq for AlterKind
Auto Trait Implementations§
impl Freeze for AlterKind
impl RefUnwindSafe for AlterKind
impl Send for AlterKind
impl Sync for AlterKind
impl Unpin for AlterKind
impl UnsafeUnpin for AlterKind
impl UnwindSafe for AlterKind
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