Struct sea_query::table::TableDropStatement[][src]

pub struct TableDropStatement { /* fields omitted */ }

Drop a table

Examples

use sea_query::{*, tests_cfg::*};
 
let table = Table::drop()
    .table(Glyph::Table)
    .table(Char::Table)
    .to_owned();
 
assert_eq!(
    table.to_string(MysqlQueryBuilder),
    r#"DROP TABLE `glyph`, `character`"#
);
assert_eq!(
    table.to_string(PostgresQueryBuilder),
    r#"DROP TABLE "glyph", "character""#
);
assert_eq!(
    table.to_string(SqliteQueryBuilder),
    r#"DROP TABLE `glyph`, `character`"#
);

Implementations

impl TableDropStatement[src]

pub fn new() -> Self[src]

Construct drop table statement

pub fn table<T: 'static>(self, table: T) -> Self where
    T: Iden
[src]

Set table name

pub fn if_exists(self) -> Self[src]

Drop table if exists

pub fn restrict(self) -> Self[src]

Drop option restrict

pub fn cascade(self) -> Self[src]

Drop option cacade

pub fn build<T: TableBuilder>(&self, table_builder: T) -> String[src]

Build corresponding SQL statement for certain database backend and return SQL string

pub fn build_any(&self, table_builder: &dyn TableBuilder) -> String[src]

Build corresponding SQL statement for certain database backend and return SQL string

pub fn to_string<T: TableBuilder>(&self, table_builder: T) -> String[src]

Build corresponding SQL statement for certain database backend and return SQL string

Trait Implementations

impl Clone for TableDropStatement[src]

impl Default for TableDropStatement[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, 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.