pub enum ConditionValue {
SqlState {
value_keyword: bool,
sqlstate: Literal,
meta: Meta,
},
ErrorCode {
code: Literal,
meta: Meta,
},
ConditionName {
name: Ident,
meta: Meta,
},
}Expand description
A condition value across the shared condition family: a SQLSTATE string, a MySQL
error code, or a declared condition name.
The variant SET each parser produces is the grammar’s subset for its site, not the whole
enum: DECLARE … CONDITION FOR produces SqlState or
ErrorCode (never a name — that form is a syntax error there), while
SIGNAL/RESIGNAL produce SqlState or
ConditionName (a bare error code is a syntax error for
SIGNAL, engine-measured 1064). The type is the union so the two siblings share one
vocabulary rather than minting parallel SqlState shapes.
Variants§
SqlState
SQLSTATE [VALUE] '<sqlstate>' — a five-character SQLSTATE string constant.
Fields
ErrorCode
A bare MySQL error-code integer (e.g. 1051). DECLARE … CONDITION FOR only; a
bare code is a syntax error in SIGNAL/RESIGNAL.
ConditionName
A condition name declared earlier in the block (DECLARE … CONDITION), signalled by
SIGNAL <name> / RESIGNAL <name>. Grammar-valid at top level (the sp-context
resolution restriction MySQL enforces — 1319 outside a stored program — is a
semantic check this parser leaves to name resolution, not a syntax reject).
Trait Implementations§
Source§impl Clone for ConditionValue
impl Clone for ConditionValue
Source§fn clone(&self) -> ConditionValue
fn clone(&self) -> ConditionValue
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 ConditionValue
impl Debug for ConditionValue
Source§impl<'de> Deserialize<'de> for ConditionValue
impl<'de> Deserialize<'de> for ConditionValue
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 ConditionValue
Source§impl Hash for ConditionValue
impl Hash for ConditionValue
Source§impl PartialEq for ConditionValue
impl PartialEq for ConditionValue
Source§impl Render for ConditionValue
impl Render for ConditionValue
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 ConditionValue
impl Serialize for ConditionValue
impl StructuralPartialEq for ConditionValue
Auto Trait Implementations§
impl Freeze for ConditionValue
impl RefUnwindSafe for ConditionValue
impl Send for ConditionValue
impl Sync for ConditionValue
impl Unpin for ConditionValue
impl UnsafeUnpin for ConditionValue
impl UnwindSafe for ConditionValue
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.