Struct sea_query::extension::postgres::TypeDropStatement
source ยท pub struct TypeDropStatement { /* private fields */ }
Available on crate feature
backend-postgres
only.Implementationsยง
sourceยงimpl TypeDropStatement
impl TypeDropStatement
pub fn new() -> Self
sourcepub fn name<T>(&mut self, name: T) -> &mut Selfwhere
T: IntoTypeRef,
pub fn name<T>(&mut self, name: T) -> &mut Selfwhere
T: IntoTypeRef,
Drop a type
use sea_query::{extension::postgres::Type, *};
struct FontFamily;
impl Iden for FontFamily {
fn unquoted(&self, s: &mut dyn Write) {
write!(s, "{}", "font_family").unwrap();
}
}
assert_eq!(
Type::drop()
.if_exists()
.name(FontFamily)
.restrict()
.to_string(PostgresQueryBuilder),
r#"DROP TYPE IF EXISTS "font_family" RESTRICT"#
);
pub fn names<T, I>(&mut self, names: I) -> &mut Selfwhere
T: IntoTypeRef,
I: IntoIterator<Item = T>,
sourceยงimpl TypeDropStatement
impl TypeDropStatement
pub fn build_ref<T: TypeBuilder>(&self, type_builder: &T) -> String
pub fn build_collect<T: TypeBuilder>(
&self,
type_builder: T,
sql: &mut dyn SqlWriter
) -> String
pub fn build_collect_ref<T: TypeBuilder>(
&self,
type_builder: &T,
sql: &mut dyn SqlWriter
) -> String
sourcepub fn to_string<T>(&self, type_builder: T) -> Stringwhere
T: TypeBuilder + QueryBuilder,
pub fn to_string<T>(&self, type_builder: T) -> Stringwhere
T: TypeBuilder + QueryBuilder,
Build corresponding SQL statement and return SQL string
Trait Implementationsยง
sourceยงimpl Clone for TypeDropStatement
impl Clone for TypeDropStatement
sourceยงfn clone(&self) -> TypeDropStatement
fn clone(&self) -> TypeDropStatement
Returns a copy of the value. Read more
1.0.0 ยท sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceยงimpl Debug for TypeDropStatement
impl Debug for TypeDropStatement
sourceยงimpl Default for TypeDropStatement
impl Default for TypeDropStatement
sourceยงfn default() -> TypeDropStatement
fn default() -> TypeDropStatement
Returns the โdefault valueโ for a type. Read more