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]
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]
T: Iden,
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 Clone for TableDropStatement[src]fn clone(&self) -> TableDropStatement[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Default for TableDropStatement[src]
impl Default for TableDropStatement[src]Auto Trait Implementations
impl !RefUnwindSafe for TableDropStatement
impl !RefUnwindSafe for TableDropStatementimpl !Send for TableDropStatement
impl !Send for TableDropStatementimpl !Sync for TableDropStatement
impl !Sync for TableDropStatementimpl Unpin for TableDropStatement
impl Unpin for TableDropStatementimpl !UnwindSafe for TableDropStatement
impl !UnwindSafe for TableDropStatement