pub struct DropView<'a> {
pub drop_span: Span,
pub temporary: Option<Span>,
pub view_span: Span,
pub if_exists: Option<Span>,
pub views: Vec<Identifier<'a>>,
}
Expand description
Represent a drop view statement
let sql = "DROP VIEW `Employees`, `Customers`;";
let mut stmts = parse_statements(sql, &mut issues, &options);
let delete: DropView = match stmts.pop() {
Some(Statement::DropView(d)) => d,
_ => panic!("We should get a drop table statement")
};
assert!(delete.views.get(0).unwrap().as_str() == "Employees");
Fields§
§drop_span: Span
Span of “DROP”
temporary: Option<Span>
Span of “TEMPORARY” if specified
view_span: Span
Span of “VIEW”
if_exists: Option<Span>
Span of “IF EXISTS”
views: Vec<Identifier<'a>>
List of views to drop
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for DropView<'a>
impl<'a> Send for DropView<'a>
impl<'a> Sync for DropView<'a>
impl<'a> Unpin for DropView<'a>
impl<'a> UnwindSafe for DropView<'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