pub enum DdlOperation {
Show 16 variants
CreateTable {
table: String,
if_not_exists: bool,
},
DropTable {
table: String,
},
AlterTableAddColumn {
table: String,
column: String,
data_type: String,
has_default: bool,
is_not_null: bool,
},
AlterTableDropColumn {
table: String,
column: String,
},
AlterTableAlterColumn {
table: String,
column: String,
},
CreateIndex {
name: String,
table: String,
is_concurrent: bool,
is_unique: bool,
},
DropIndex {
name: String,
},
CreateView {
name: String,
is_materialized: bool,
},
DropView {
name: String,
},
CreateFunction {
name: String,
},
DropFunction {
name: String,
},
AddConstraint {
table: String,
constraint_type: String,
},
DropConstraint {
table: String,
name: String,
},
CreateEnum {
name: String,
},
TruncateTable {
table: String,
},
Other {
statement_preview: String,
},
}Expand description
A DDL operation extracted from SQL.
Variants§
CreateTable
A CREATE TABLE statement.
Fields
DropTable
A DROP TABLE statement.
AlterTableAddColumn
An ALTER TABLE … ADD COLUMN statement.
Fields
AlterTableDropColumn
An ALTER TABLE … DROP COLUMN statement.
Fields
AlterTableAlterColumn
An ALTER TABLE … ALTER COLUMN statement.
Fields
CreateIndex
A CREATE INDEX statement.
Fields
DropIndex
A DROP INDEX statement.
CreateView
A CREATE VIEW or CREATE MATERIALIZED VIEW statement.
Fields
DropView
A DROP VIEW statement.
CreateFunction
A CREATE FUNCTION statement.
DropFunction
A DROP FUNCTION statement.
AddConstraint
An ALTER TABLE … ADD CONSTRAINT statement.
Fields
DropConstraint
An ALTER TABLE … DROP CONSTRAINT statement.
Fields
CreateEnum
A CREATE TYPE … AS ENUM statement.
TruncateTable
A TRUNCATE TABLE statement.
Other
Any other SQL statement that does not match known DDL patterns.
Trait Implementations§
Source§impl Clone for DdlOperation
impl Clone for DdlOperation
Source§fn clone(&self) -> DdlOperation
fn clone(&self) -> DdlOperation
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 DdlOperation
impl Debug for DdlOperation
Source§impl Display for DdlOperation
impl Display for DdlOperation
Source§impl Hash for DdlOperation
impl Hash for DdlOperation
Source§impl PartialEq for DdlOperation
impl PartialEq for DdlOperation
Source§impl Serialize for DdlOperation
impl Serialize for DdlOperation
impl Eq for DdlOperation
impl StructuralPartialEq for DdlOperation
Auto Trait Implementations§
impl Freeze for DdlOperation
impl RefUnwindSafe for DdlOperation
impl Send for DdlOperation
impl Sync for DdlOperation
impl Unpin for DdlOperation
impl UnsafeUnpin for DdlOperation
impl UnwindSafe for DdlOperation
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.