pub struct AlterDatabaseOptions {
pub spelling: DatabaseKeyword,
pub name: Option<Ident>,
pub options: ThinVec<AlterDatabaseOption>,
pub meta: Meta,
}Expand description
A MySQL ALTER {DATABASE | SCHEMA} [<name>] <option> … schema-option change (sql_yacc.yy
alter_database_stmt), gated by
StatementDdlGates::alter_database_options.
A distinct node — and gate — from DuckDB’s AlterDatabase SET ALIAS relocation: the two
share only the ALTER DATABASE head, and their grammars are disjoint (DuckDB requires a name
and a single SET ALIAS TO; MySQL’s name is optional — ALTER DATABASE CHARACTER SET utf8
binds the default schema — and it takes a non-empty, repeatable list of charset/collation/
encryption/read-only AlterDatabaseOptions). Modelling them apart keeps each behaviour’s
invariants in the type rather than as XOR-populated fields on one node. The DATABASE/
SCHEMA spelling is an exact synonym recorded for round-trip.
Fields§
§spelling: DatabaseKeywordWhich of the synonymous DATABASE/SCHEMA keywords was written.
name: Option<Ident>The database name, or None for the unqualified ALTER DATABASE <option> … form that
targets the session’s default schema (ident_or_empty; a dotted d.x is
ER_PARSE_ERROR, so a bare Ident).
options: ThinVec<AlterDatabaseOption>The option list, in source order; non-empty (alter_database_options).
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl Clone for AlterDatabaseOptions
impl Clone for AlterDatabaseOptions
Source§fn clone(&self) -> AlterDatabaseOptions
fn clone(&self) -> AlterDatabaseOptions
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 AlterDatabaseOptions
impl Debug for AlterDatabaseOptions
Source§impl<'de> Deserialize<'de> for AlterDatabaseOptions
impl<'de> Deserialize<'de> for AlterDatabaseOptions
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 AlterDatabaseOptions
Source§impl Hash for AlterDatabaseOptions
impl Hash for AlterDatabaseOptions
Source§impl PartialEq for AlterDatabaseOptions
impl PartialEq for AlterDatabaseOptions
Source§impl Render for AlterDatabaseOptions
impl Render for AlterDatabaseOptions
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 AlterDatabaseOptions
impl Serialize for AlterDatabaseOptions
Source§impl Spanned for AlterDatabaseOptions
impl Spanned for AlterDatabaseOptions
impl StructuralPartialEq for AlterDatabaseOptions
Auto Trait Implementations§
impl Freeze for AlterDatabaseOptions
impl RefUnwindSafe for AlterDatabaseOptions
impl Send for AlterDatabaseOptions
impl Sync for AlterDatabaseOptions
impl Unpin for AlterDatabaseOptions
impl UnsafeUnpin for AlterDatabaseOptions
impl UnwindSafe for AlterDatabaseOptions
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.