pub enum AlterTableOperation {
Show 16 variants
AddConstraint(TableConstraint),
AddColumn {
column_def: ColumnDef,
},
DropConstraint {
name: Ident,
},
DropColumn {
column_name: Ident,
if_exists: bool,
cascade: bool,
},
RenameColumn {
old_column_name: Ident,
new_column_name: Ident,
},
RenameTable {
table_name: ObjectName,
},
ChangeColumn {
old_name: Ident,
new_name: Ident,
data_type: DataType,
options: Vec<ColumnOption>,
},
RenameConstraint {
old_name: Ident,
new_name: Ident,
},
AlterColumn {
column_name: Ident,
op: AlterColumnOperation,
},
ChangeOwner {
new_owner_name: Ident,
},
SetSchema {
new_schema_name: ObjectName,
},
SetParallelism {
parallelism: SetVariableValue,
deferred: bool,
},
RefreshSchema,
SetSourceRateLimit {
rate_limit: i32,
},
SetBackfillRateLimit {
rate_limit: i32,
},
SwapRenameTable {
target_table: ObjectName,
},
}
Expand description
An ALTER TABLE
(Statement::AlterTable
) operation
Variants§
AddConstraint(TableConstraint)
ADD <table_constraint>
AddColumn
ADD [ COLUMN ] <column_def>
DropConstraint
TODO: implement DROP CONSTRAINT <name>
DropColumn
DROP [ COLUMN ] [ IF EXISTS ] <column_name> [ CASCADE ]
RenameColumn
RENAME [ COLUMN ] <old_column_name> TO <new_column_name>
RenameTable
RENAME TO <table_name>
Fields
§
table_name: ObjectName
ChangeColumn
RenameConstraint
RENAME CONSTRAINT <old_constraint_name> TO <new_constraint_name>
Note: this is a PostgreSQL-specific operation.
AlterColumn
ALTER [ COLUMN ]
ChangeOwner
OWNER TO <owner_name>
SetSchema
SET SCHEMA <schema_name>
Fields
§
new_schema_name: ObjectName
SetParallelism
SET PARALLELISM TO <parallelism> [ DEFERRED ]
RefreshSchema
SetSourceRateLimit
SET SOURCE_RATE_LIMIT TO <rate_limit>
SetBackfillRateLimit
SET BACKFILL_RATE_LIMIT TO <rate_limit>
SwapRenameTable
SWAP WITH <table_name>
Fields
§
target_table: ObjectName
Trait Implementations§
source§impl Clone for AlterTableOperation
impl Clone for AlterTableOperation
source§fn clone(&self) -> AlterTableOperation
fn clone(&self) -> AlterTableOperation
Returns a copy 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 moresource§impl Debug for AlterTableOperation
impl Debug for AlterTableOperation
source§impl Display for AlterTableOperation
impl Display for AlterTableOperation
source§impl Hash for AlterTableOperation
impl Hash for AlterTableOperation
source§impl PartialEq for AlterTableOperation
impl PartialEq for AlterTableOperation
impl Eq for AlterTableOperation
impl StructuralPartialEq for AlterTableOperation
Auto Trait Implementations§
impl Freeze for AlterTableOperation
impl RefUnwindSafe for AlterTableOperation
impl Send for AlterTableOperation
impl Sync for AlterTableOperation
impl Unpin for AlterTableOperation
impl UnwindSafe for AlterTableOperation
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more