Enum sqlx_models_parser::ast::AlterTableOperation [−][src]
pub enum AlterTableOperation {
AddConstraint(TableConstraint),
AddColumn {
column_def: ColumnDef,
},
DropConstraint {
name: Ident,
cascade: bool,
restrict: bool,
},
DropColumn {
column_name: Ident,
if_exists: bool,
cascade: bool,
},
RenamePartitions {
old_partitions: Vec<Expr>,
new_partitions: Vec<Expr>,
},
AddPartitions {
if_not_exists: bool,
new_partitions: Vec<Expr>,
},
DropPartitions {
partitions: Vec<Expr>,
if_exists: bool,
},
RenameColumn {
old_column_name: Ident,
new_column_name: Ident,
},
RenameTable {
table_name: ObjectName,
},
}
Expand description
An ALTER TABLE
(Statement::AlterTable
) operation
Variants
AddConstraint(TableConstraint)
ADD <table_constraint>
Tuple Fields of AddConstraint
ADD [ COLUMN ] <column_def>
Fields of AddColumn
column_def: ColumnDef
TODO: implement DROP CONSTRAINT <name>
DROP [ COLUMN ] [ IF EXISTS ] <column_name> [ CASCADE ]
RENAME TO PARTITION (partition=val)
Add Partitions
RENAME [ COLUMN ] <old_column_name> TO <new_column_name>
RENAME TO <table_name>
Fields of RenameTable
table_name: ObjectName
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for AlterTableOperation
impl Send for AlterTableOperation
impl Sync for AlterTableOperation
impl Unpin for AlterTableOperation
impl UnwindSafe for AlterTableOperation
Blanket Implementations
Mutably borrows from an owned value. Read more