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