pub struct DropDatabase {
pub spelling: DatabaseKeyword,
pub if_exists: bool,
pub name: Ident,
pub meta: Meta,
}Expand description
DROP {DATABASE | SCHEMA} [IF EXISTS] <name> — MySQL’s single-database drop, where
DATABASE and SCHEMA are exact synonyms (the lexer folds SCHEMA onto DATABASE).
Kept apart from the generic name-list Statement::Drop because the form names exactly
ONE unqualified database — server-measured on mysql:8, DROP DATABASE a, b is
ER_PARSE_ERROR, DROP DATABASE db.x is ER_PARSE_ERROR, and it takes no
CASCADE/RESTRICT (both syntax errors) — unlike PostgreSQL/DuckDB’s DROP SCHEMA <name> [, …] [CASCADE | RESTRICT], which keeps riding the shared DropStatement
grammar there. Gated by
StatementDdlGates::drop_database.
Fields§
§spelling: DatabaseKeywordWhich of the two synonymous keywords was written; recorded so the source spelling
round-trips verbatim (the tag pattern of TemporaryTableKind, not a semantic
difference — MySQL treats the two identically).
if_exists: boolWhether the IF EXISTS guard was written.
name: IdentThe single database name — a bare unqualified identifier (ident; a dotted
db.x is a server syntax error).
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for DropDatabase
impl Clone for DropDatabase
Source§fn clone(&self) -> DropDatabase
fn clone(&self) -> DropDatabase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DropDatabase
impl Debug for DropDatabase
Source§impl<'de> Deserialize<'de> for DropDatabase
impl<'de> Deserialize<'de> for DropDatabase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DropDatabase
Source§impl Hash for DropDatabase
impl Hash for DropDatabase
Source§impl PartialEq for DropDatabase
impl PartialEq for DropDatabase
Source§impl Render for DropDatabase
impl Render for DropDatabase
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreSource§impl Serialize for DropDatabase
impl Serialize for DropDatabase
impl StructuralPartialEq for DropDatabase
Auto Trait Implementations§
impl Freeze for DropDatabase
impl RefUnwindSafe for DropDatabase
impl Send for DropDatabase
impl Sync for DropDatabase
impl Unpin for DropDatabase
impl UnsafeUnpin for DropDatabase
impl UnwindSafe for DropDatabase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.