pub struct DropSchemaStatement { /* private fields */ }Expand description
DROP SCHEMA statement builder
This struct provides a fluent API for constructing DROP SCHEMA queries.
§Examples
use reinhardt_query::prelude::*;
// DROP SCHEMA my_schema
let query = Query::drop_schema()
.name("my_schema");
// DROP SCHEMA IF EXISTS my_schema
let query = Query::drop_schema()
.name("my_schema")
.if_exists();
// DROP SCHEMA my_schema CASCADE
let query = Query::drop_schema()
.name("my_schema")
.cascade();Implementations§
Source§impl DropSchemaStatement
impl DropSchemaStatement
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DROP SCHEMA statement
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_schema();Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Take the ownership of data in the current DropSchemaStatement
Sourcepub fn name<N>(&mut self, name: N) -> &mut Selfwhere
N: IntoIden,
pub fn name<N>(&mut self, name: N) -> &mut Selfwhere
N: IntoIden,
Set the schema name
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_schema()
.name("my_schema");Trait Implementations§
Source§impl Clone for DropSchemaStatement
impl Clone for DropSchemaStatement
Source§fn clone(&self) -> DropSchemaStatement
fn clone(&self) -> DropSchemaStatement
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 moreSource§impl Debug for DropSchemaStatement
impl Debug for DropSchemaStatement
Source§impl Default for DropSchemaStatement
impl Default for DropSchemaStatement
Source§impl QueryStatementBuilder for DropSchemaStatement
impl QueryStatementBuilder for DropSchemaStatement
Source§fn build_any(&self, query_builder: &dyn QueryBuilderTrait) -> (String, Values)
fn build_any(&self, query_builder: &dyn QueryBuilderTrait) -> (String, Values)
Build SQL statement for a database backend and collect query parameters Read more
impl QueryStatementWriter for DropSchemaStatement
Auto Trait Implementations§
impl Freeze for DropSchemaStatement
impl !RefUnwindSafe for DropSchemaStatement
impl !Send for DropSchemaStatement
impl !Sync for DropSchemaStatement
impl Unpin for DropSchemaStatement
impl UnsafeUnpin for DropSchemaStatement
impl !UnwindSafe for DropSchemaStatement
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