Struct sql_parse::DropDatabase 
source · pub struct DropDatabase<'a> {
    pub drop_span: Span,
    pub database_span: Span,
    pub if_exists: Option<Span>,
    pub database: Identifier<'a>,
}Expand description
Represent a drop database statement
let sql = "DROP DATABASE mydb;";
let mut stmts = parse_statements(sql, &mut issues, &options);
let s: DropDatabase = match stmts.pop() {
    Some(Statement::DropDatabase(s)) => s,
    _ => panic!("We should get a drop database statement")
};
assert!(s.database.as_str() == "mydb");Fields§
§drop_span: SpanSpan of “DROP”
database_span: SpanSpan of “DATABASE”
if_exists: Option<Span>Span of “IF EXISTS” if specified
database: Identifier<'a>Name of database to drop
Trait Implementations§
source§impl<'a> Clone for DropDatabase<'a>
 
impl<'a> Clone for DropDatabase<'a>
source§fn clone(&self) -> DropDatabase<'a>
 
fn clone(&self) -> DropDatabase<'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 moresource§impl<'a> Debug for DropDatabase<'a>
 
impl<'a> Debug for DropDatabase<'a>
Auto Trait Implementations§
impl<'a> Freeze for DropDatabase<'a>
impl<'a> RefUnwindSafe for DropDatabase<'a>
impl<'a> Send for DropDatabase<'a>
impl<'a> Sync for DropDatabase<'a>
impl<'a> Unpin for DropDatabase<'a>
impl<'a> UnwindSafe for DropDatabase<'a>
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