[][src]Enum sqlparser::ast::AlterTableOperation

pub enum AlterTableOperation {
    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: Ident,
    },
}

An ALTER TABLE (Statement::AlterTable) operation

Variants

AddConstraint(TableConstraint)

ADD <table_constraint>

AddColumn

ADD [ COLUMN ] <column_def>

Fields of AddColumn

column_def: ColumnDef
DropConstraint

TODO: implement DROP CONSTRAINT <name>

Fields of DropConstraint

name: Ident
DropColumn

DROP [ COLUMN ] [ IF EXISTS ] <column_name> [ CASCADE ]

Fields of DropColumn

column_name: Identif_exists: boolcascade: bool
RenameColumn

RENAME [ COLUMN ] <old_column_name> TO <new_column_name>

Fields of RenameColumn

old_column_name: Identnew_column_name: Ident
RenameTable

RENAME TO <table_name>

Fields of RenameTable

table_name: Ident

Trait Implementations

impl Clone for AlterTableOperation[src]

impl Debug for AlterTableOperation[src]

impl Display for AlterTableOperation[src]

impl Eq for AlterTableOperation[src]

impl Hash for AlterTableOperation[src]

impl PartialEq<AlterTableOperation> for AlterTableOperation[src]

impl StructuralEq for AlterTableOperation[src]

impl StructuralPartialEq for AlterTableOperation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.