Struct ExtensionDropStatement
pub struct ExtensionDropStatement { /* private fields */ }Expand description
Creates a new “DROP EXTENSION” statement for PostgreSQL
§Synopsis
ⓘ
DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]§Example
Drops the “ltree” extension if it exists.
use sea_query::{extension::postgres::Extension, *};
assert_eq!(
Extension::drop()
.name("ltree")
.cascade()
.if_exists()
.to_string(PostgresQueryBuilder),
r#"DROP EXTENSION IF EXISTS ltree CASCADE"#
);§References
Implementations§
§impl ExtensionDropStatement
impl ExtensionDropStatement
pub fn new() -> Self
pub fn name<T: Into<String>>(&mut self, name: T) -> &mut Self
pub fn name<T: Into<String>>(&mut self, name: T) -> &mut Self
Sets the name of the extension to be dropped.
pub fn if_exists(&mut self) -> &mut Self
pub fn if_exists(&mut self) -> &mut Self
Uses “IF EXISTS” on Drop Extension Statement.
pub fn cascade(&mut self) -> &mut Self
pub fn cascade(&mut self) -> &mut Self
Uses “CASCADE” on Drop Extension Statement.
pub fn restrict(&mut self) -> &mut Self
pub fn restrict(&mut self) -> &mut Self
Uses “RESTRICT” on Drop Extension Statement.
§impl ExtensionDropStatement
impl ExtensionDropStatement
pub fn build_ref<T: ExtensionBuilder>(&self, extension_builder: &T) -> String
pub fn build_collect<T: ExtensionBuilder>( &self, extension_builder: T, sql: &mut impl SqlWriter, ) -> String
pub fn build_collect_ref<T: ExtensionBuilder>( &self, extension_builder: &T, sql: &mut impl SqlWriter, ) -> String
pub fn to_string<T>(&self, extension_builder: T) -> Stringwhere
T: ExtensionBuilder + QueryBuilder,
pub fn to_string<T>(&self, extension_builder: T) -> Stringwhere
T: ExtensionBuilder + QueryBuilder,
Build corresponding SQL statement and return SQL string
Trait Implementations§
§impl Clone for ExtensionDropStatement
impl Clone for ExtensionDropStatement
§fn clone(&self) -> ExtensionDropStatement
fn clone(&self) -> ExtensionDropStatement
Returns a duplicate 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 more§impl Debug for ExtensionDropStatement
impl Debug for ExtensionDropStatement
§impl Default for ExtensionDropStatement
impl Default for ExtensionDropStatement
§fn default() -> ExtensionDropStatement
fn default() -> ExtensionDropStatement
Returns the “default value” for a type. Read more
§impl PartialEq for ExtensionDropStatement
impl PartialEq for ExtensionDropStatement
impl Eq for ExtensionDropStatement
impl StructuralPartialEq for ExtensionDropStatement
Auto Trait Implementations§
impl Freeze for ExtensionDropStatement
impl RefUnwindSafe for ExtensionDropStatement
impl Send for ExtensionDropStatement
impl Sync for ExtensionDropStatement
impl Unpin for ExtensionDropStatement
impl UnwindSafe for ExtensionDropStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more