pub struct DropSequenceStatement { /* private fields */ }Expand description
DROP SEQUENCE statement builder
This struct provides a fluent API for constructing DROP SEQUENCE queries.
§Examples
use reinhardt_query::prelude::*;
// DROP SEQUENCE my_seq
let query = Query::drop_sequence()
.name("my_seq");
// DROP SEQUENCE IF EXISTS my_seq
let query = Query::drop_sequence()
.name("my_seq")
.if_exists();
// DROP SEQUENCE my_seq CASCADE
let query = Query::drop_sequence()
.name("my_seq")
.cascade();Implementations§
Source§impl DropSequenceStatement
impl DropSequenceStatement
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DROP SEQUENCE statement
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_sequence();Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Take the ownership of data in the current DropSequenceStatement
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 sequence name
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_sequence()
.name("my_seq");Sourcepub fn if_exists(&mut self) -> &mut Self
pub fn if_exists(&mut self) -> &mut Self
Add IF EXISTS clause
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_sequence()
.name("my_seq")
.if_exists();Trait Implementations§
Source§impl Clone for DropSequenceStatement
impl Clone for DropSequenceStatement
Source§fn clone(&self) -> DropSequenceStatement
fn clone(&self) -> DropSequenceStatement
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 DropSequenceStatement
impl Debug for DropSequenceStatement
Source§impl Default for DropSequenceStatement
impl Default for DropSequenceStatement
Source§impl QueryStatementBuilder for DropSequenceStatement
impl QueryStatementBuilder for DropSequenceStatement
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 DropSequenceStatement
Auto Trait Implementations§
impl Freeze for DropSequenceStatement
impl !RefUnwindSafe for DropSequenceStatement
impl !Send for DropSequenceStatement
impl !Sync for DropSequenceStatement
impl Unpin for DropSequenceStatement
impl UnsafeUnpin for DropSequenceStatement
impl !UnwindSafe for DropSequenceStatement
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