Struct bison_orm::builder::AlterTableBuilder[][src]

pub struct AlterTableBuilder { /* fields omitted */ }

A query builder for ALTER TABLE statement.

Implementations

impl AlterTableBuilder[src]

pub fn new(name: impl Into<String>) -> Self[src]

Creates a query builder for the ALTER TABLE statement.

pub fn add_column(&mut self, mut column: ColumnBuilder) -> &mut Self[src]

Appends the ADD COLUMN clause to the given ALTER TABLE statement.

pub fn modify_column(&mut self, mut column: ColumnBuilder) -> &mut Self[src]

Appends the MODIFY/ALTER COLUMN clause to the given ALTER TABLE statement.

pub fn rename_column(
    &mut self,
    old: impl Into<String>,
    new: impl Into<String>
) -> &mut Self
[src]

Appends the RENAME COLUMN clause to the given ALTER TABLE statement.

pub fn drop_column(&mut self, mut column: ColumnBuilder) -> &mut Self[src]

Appends the DROP COLUMN clause to the given ALTER TABLE statement.

pub fn rename_index(
    &mut self,
    old: impl Into<String>,
    new: impl Into<String>
) -> &mut Self
[src]

Appends the RENAME INDEX clause to the given ALTER TABLE statement.

pub fn drop_index(&mut self, name: impl AsRef<str>) -> &mut Self[src]

Appends the DROP INDEX clause to the given ALTER TABLE statement.

pub fn add_index(&mut self, index: IndexBuilder) -> &mut Self[src]

Appends the ADD INDEX clause to the given ALTER TABLE statement.

pub fn add_foreign_key(&mut self, mut fk: ForeignKeyBuilder) -> &mut Self[src]

Adds a foreign key constraint to the given ALTER TABLE statement.

pub fn drop_constraint(&mut self, ident: impl AsRef<str>) -> &mut Self[src]

Appends the DROP CONSTRAINT clause to the given ALTER TABLE statement.

pub fn drop_foreign_key(&mut self, ident: impl AsRef<str>) -> &mut Self[src]

Appends the DROP FOREIGN KEY clause to the given ALTER TABLE statement.

Trait Implementations

impl Builder for AlterTableBuilder[src]

impl Default for AlterTableBuilder[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> BuilderExt for T where
    T: ChildBuilder, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.