pub enum AlterTableOperation {
Show 19 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,
},
SetDmlRateLimit {
rate_limit: i32,
},
SwapRenameTable {
target_table: ObjectName,
},
DropConnector,
AlterConnectorProps {
alter_props: Vec<SqlOption>,
},
}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: ObjectNameChangeColumn
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: ObjectNameSetParallelism
SET PARALLELISM TO <parallelism> [ DEFERRED ]
RefreshSchema
SetSourceRateLimit
SET SOURCE_RATE_LIMIT TO <rate_limit>
SetBackfillRateLimit
SET BACKFILL_RATE_LIMIT TO <rate_limit>
SetDmlRateLimit
SET DML_RATE_LIMIT TO <rate_limit>
SwapRenameTable
SWAP WITH <table_name>
Fields
§
target_table: ObjectNameDropConnector
DROP CONNECTOR
AlterConnectorProps
ALTER CONNECTOR WITH (<connector_props>)
Trait Implementations§
Source§impl Clone for AlterTableOperation
impl Clone for AlterTableOperation
Source§fn clone(&self) -> AlterTableOperation
fn clone(&self) -> AlterTableOperation
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 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,
§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