Struct sql_parse::DropFunction
source · pub struct DropFunction<'a> {
pub drop_span: Span,
pub function_span: Span,
pub if_exists: Option<Span>,
pub function: Identifier<'a>,
}
Expand description
Represent a drop function statement
let sql = "DROP FUNCTION myfunc;";
let mut stmts = parse_statements(sql, &mut issues, &options);
let s: DropFunction = match stmts.pop() {
Some(Statement::DropFunction(s)) => s,
_ => panic!("We should get a drop function statement")
};
assert!(s.function.as_str() == "myfunc");
Fields§
§drop_span: Span
Span of “DROP”
function_span: Span
Span of “FUNCTION”
if_exists: Option<Span>
Span of “IF EXISTS” if specified
function: Identifier<'a>
Function to drop
Trait Implementations§
source§impl<'a> Clone for DropFunction<'a>
impl<'a> Clone for DropFunction<'a>
source§fn clone(&self) -> DropFunction<'a>
fn clone(&self) -> DropFunction<'a>
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 more