pub struct ViewOptions {
pub algorithm: Option<ViewAlgorithm>,
pub definer: Option<Box<Definer>>,
pub sql_security: Option<SqlSecurityContext>,
}Expand description
The MySQL view definition-option prefix [ALGORITHM = …] [DEFINER = …] [SQL SECURITY …],
shared verbatim by CreateView and AlterView — the two statements name the same
options in the same fixed source order, immediately before the VIEW keyword.
Each option is independently optional; the source order (algorithm, then definer, then SQL
security) is engine-required — a permutation (DEFINER before ALGORITHM, SQL SECURITY
before either) is ER_PARSE_ERROR. All-None is the ordinary view with no prefix (every
non-MySQL dialect, and a bare MySQL CREATE/ALTER VIEW). The Definer reuses the shared
routine/event account reference; the SqlSecurityContext reuses the routine security tag.
This is a non-spanned bundle — Definer carries its own span, and the two Copy tags
ride the owning statement’s span, so the prefix needs no meta of its own.
Fields§
§algorithm: Option<ViewAlgorithm>The optional ALGORITHM = … processing algorithm; None when omitted.
definer: Option<Box<Definer>>The optional DEFINER = <user> account; None when omitted. Boxed like the routine
definer (a rare fat field paying only a null pointer when absent).
sql_security: Option<SqlSecurityContext>The optional SQL SECURITY { DEFINER | INVOKER } privilege context; None when omitted.
Trait Implementations§
Source§impl Clone for ViewOptions
impl Clone for ViewOptions
Source§fn clone(&self) -> ViewOptions
fn clone(&self) -> ViewOptions
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 ViewOptions
impl Debug for ViewOptions
Source§impl Default for ViewOptions
impl Default for ViewOptions
Source§fn default() -> ViewOptions
fn default() -> ViewOptions
Source§impl<'de> Deserialize<'de> for ViewOptions
impl<'de> Deserialize<'de> for ViewOptions
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 ViewOptions
Source§impl Hash for ViewOptions
impl Hash for ViewOptions
Source§impl PartialEq for ViewOptions
impl PartialEq for ViewOptions
Source§impl Render for ViewOptions
impl Render for ViewOptions
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Emit each present option with a leading space, so the prefix slots between the
CREATE/ALTER keyword and VIEW. All-None emits nothing (every non-MySQL view).
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 more