pub struct DropView<'a> {
pub drop_span: Span,
pub temporary: Option<Span>,
pub view_span: Span,
pub if_exists: Option<Span>,
pub views: Vec<QualifiedName<'a>>,
}
Expand description
Represent a drop view statement
let sql = "DROP VIEW `Employees`, `Customers`;";
let mut issues = Issues::new(sql);
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().identifier.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<QualifiedName<'a>>
List of views to drop
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DropView<'a>
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