pub struct DropDomain<'a> {
pub drop_span: Span,
pub domain_span: Span,
pub if_exists: Option<Span>,
pub domains: Vec<QualifiedName<'a>>,
pub restrict_or_cascade: Option<CascadeOrRestrict>,
}Expand description
Represent a drop domain statement
let sql = "DROP DOMAIN IF EXISTS mydomain, otherdomain;";
let mut issues = Issues::new(sql);
let mut stmts = parse_statements(sql, &mut issues, &options);
let drop: DropDomain = match stmts.pop() {
Some(Statement::DropDomain(d)) => *d,
_ => panic!("We should get a drop domain statement")
};
assert!(drop.domains.get(0).unwrap().identifier.as_str() == "mydomain");Fields§
§drop_span: SpanSpan of “DROP”
domain_span: SpanSpan of “DOMAIN”
if_exists: Option<Span>Span of “IF EXISTS” if specified
domains: Vec<QualifiedName<'a>>List of domains to drop
restrict_or_cascade: Option<CascadeOrRestrict>Restrict or cascade option (PostgreSQL)
Trait Implementations§
Source§impl<'a> Clone for DropDomain<'a>
impl<'a> Clone for DropDomain<'a>
Source§fn clone(&self) -> DropDomain<'a>
fn clone(&self) -> DropDomain<'a>
Returns a duplicate 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 DropDomain<'a>
impl<'a> Debug for DropDomain<'a>
Auto Trait Implementations§
impl<'a> Freeze for DropDomain<'a>
impl<'a> RefUnwindSafe for DropDomain<'a>
impl<'a> Send for DropDomain<'a>
impl<'a> Sync for DropDomain<'a>
impl<'a> Unpin for DropDomain<'a>
impl<'a> UnsafeUnpin for DropDomain<'a>
impl<'a> UnwindSafe for DropDomain<'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