pub enum AlterDatabaseOption {
CharacterSet {
default: bool,
keyword: CharsetKeyword,
equals: bool,
charset: Ident,
meta: Meta,
},
Collate {
default: bool,
equals: bool,
collation: Ident,
meta: Meta,
},
Encryption {
default: bool,
equals: bool,
value: Literal,
meta: Meta,
},
ReadOnly {
equals: bool,
value: ReadOnlyValue,
meta: Meta,
},
}Expand description
One ALTER {DATABASE | SCHEMA} option (sql_yacc.yy alter_database_option). The [=]
(opt_equal) and, where admitted, the leading [DEFAULT] are recorded so the surface
form round-trips verbatim. The value grammars are fixed; a value outside the set is a parse
or bind reject on mysql:8.4.10 (READ ONLY 2 is ER_PARSE_ERROR; ENCRYPTION 'X' binds
then rejects ER_WRONG_VALUE, so any string parses).
Variants§
CharacterSet
[DEFAULT] {CHARACTER SET | CHARSET} [=] <charset> — the default character set. The
charset name is charset_name (ident_or_text, or the reserved BINARY), folded to
an Ident.
Fields
keyword: CharsetKeywordWhich of the CHARACTER SET/CHARSET synonyms was written.
Collate
[DEFAULT] COLLATE [=] <collation> — the default collation. The name is
collation_name (ident_or_text, or the reserved BINARY), folded to an Ident.
Fields
Encryption
[DEFAULT] ENCRYPTION [=] '<Y|N>' — the default tablespace encryption. Any string
literal parses; the Y/N restriction is a bind-time check (ER_WRONG_VALUE), so the
value is held verbatim as a Literal.
Fields
ReadOnly
READ ONLY [=] {DEFAULT | 0 | 1} — the schema read-only flag. Takes no leading
DEFAULT prefix (unlike the charset/collation/encryption options — DEFAULT READ ONLY
is ER_PARSE_ERROR); the value is a ReadOnlyValue ternary_option, and any other
number (READ ONLY 2) is ER_PARSE_ERROR.
Trait Implementations§
Source§impl Clone for AlterDatabaseOption
impl Clone for AlterDatabaseOption
Source§fn clone(&self) -> AlterDatabaseOption
fn clone(&self) -> AlterDatabaseOption
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 AlterDatabaseOption
impl Debug for AlterDatabaseOption
Source§impl<'de> Deserialize<'de> for AlterDatabaseOption
impl<'de> Deserialize<'de> for AlterDatabaseOption
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 AlterDatabaseOption
Source§impl Hash for AlterDatabaseOption
impl Hash for AlterDatabaseOption
Source§impl PartialEq for AlterDatabaseOption
impl PartialEq for AlterDatabaseOption
Source§impl Render for AlterDatabaseOption
impl Render for AlterDatabaseOption
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 AlterDatabaseOption
impl Serialize for AlterDatabaseOption
Source§impl Spanned for AlterDatabaseOption
impl Spanned for AlterDatabaseOption
impl StructuralPartialEq for AlterDatabaseOption
Auto Trait Implementations§
impl Freeze for AlterDatabaseOption
impl RefUnwindSafe for AlterDatabaseOption
impl Send for AlterDatabaseOption
impl Sync for AlterDatabaseOption
impl Unpin for AlterDatabaseOption
impl UnsafeUnpin for AlterDatabaseOption
impl UnwindSafe for AlterDatabaseOption
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.