pub struct DropFunctionStatement { /* private fields */ }Expand description
DROP FUNCTION statement builder
This struct provides a fluent API for constructing DROP FUNCTION queries.
§Examples
use reinhardt_query::prelude::*;
// DROP FUNCTION my_func
let query = Query::drop_function()
.name("my_func");
// DROP FUNCTION IF EXISTS my_func(integer) CASCADE
let query = Query::drop_function()
.name("my_func")
.if_exists()
.add_parameter("", "integer")
.cascade();Implementations§
Source§impl DropFunctionStatement
impl DropFunctionStatement
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DROP FUNCTION statement
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_function();Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Take the ownership of data in the current DropFunctionStatement
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 function name
§Examples
use reinhardt_query::prelude::*;
let query = Query::drop_function()
.name("my_func");Sourcepub fn add_parameter<N: IntoIden, T: Into<String>>(
&mut self,
name: N,
param_type: T,
) -> &mut Self
pub fn add_parameter<N: IntoIden, T: Into<String>>( &mut self, name: N, param_type: T, ) -> &mut Self
Add a function parameter (for identifying which overloaded function to drop)
§Examples
use reinhardt_query::prelude::*;
// DROP FUNCTION my_func(integer, text)
let query = Query::drop_function()
.name("my_func")
.add_parameter("", "integer")
.add_parameter("", "text");Trait Implementations§
Source§impl Clone for DropFunctionStatement
impl Clone for DropFunctionStatement
Source§fn clone(&self) -> DropFunctionStatement
fn clone(&self) -> DropFunctionStatement
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 DropFunctionStatement
impl Debug for DropFunctionStatement
Source§impl Default for DropFunctionStatement
impl Default for DropFunctionStatement
Source§impl QueryStatementBuilder for DropFunctionStatement
impl QueryStatementBuilder for DropFunctionStatement
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 DropFunctionStatement
Auto Trait Implementations§
impl Freeze for DropFunctionStatement
impl !RefUnwindSafe for DropFunctionStatement
impl !Send for DropFunctionStatement
impl !Sync for DropFunctionStatement
impl Unpin for DropFunctionStatement
impl UnsafeUnpin for DropFunctionStatement
impl !UnwindSafe for DropFunctionStatement
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