pub struct ExtensionDropStatement { /* private fields */ }
Available on crate feature
backend-postgres
only.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§
source§impl ExtensionDropStatement
impl ExtensionDropStatement
source§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 dyn SqlWriter, ) -> String
pub fn build_collect_ref<T: ExtensionBuilder>( &self, extension_builder: &T, sql: &mut dyn SqlWriter, ) -> String
sourcepub 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§
source§impl Clone for ExtensionDropStatement
impl Clone for ExtensionDropStatement
source§fn clone(&self) -> ExtensionDropStatement
fn clone(&self) -> ExtensionDropStatement
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 ExtensionDropStatement
impl Debug for ExtensionDropStatement
source§impl Default for ExtensionDropStatement
impl Default for ExtensionDropStatement
source§fn default() -> ExtensionDropStatement
fn default() -> ExtensionDropStatement
Returns the “default value” for a type. Read more
source§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)