Struct sea_query::table::TableRenameStatement
source · [−]pub struct TableRenameStatement { /* private fields */ }
Expand description
Rename a table
Examples
use sea_query::{tests_cfg::*, *};
let table = Table::rename()
.table(Font::Table, Alias::new("font_new"))
.to_owned();
assert_eq!(
table.to_string(MysqlQueryBuilder),
r#"RENAME TABLE `font` TO `font_new`"#
);
assert_eq!(
table.to_string(PostgresQueryBuilder),
r#"ALTER TABLE "font" RENAME TO "font_new""#
);
assert_eq!(
table.to_string(SqliteQueryBuilder),
r#"ALTER TABLE "font" RENAME TO "font_new""#
);
Implementations
Trait Implementations
Build corresponding SQL statement for certain database backend and return SQL string
Build corresponding SQL statement for certain database backend and return SQL string
Build corresponding SQL statement for certain database backend and return SQL string
Auto Trait Implementations
impl !RefUnwindSafe for TableRenameStatement
impl Send for TableRenameStatement
impl Sync for TableRenameStatement
impl Unpin for TableRenameStatement
impl !UnwindSafe for TableRenameStatement
Blanket Implementations
Mutably borrows from an owned value. Read more