pub enum DoArg {
Body {
body: Literal,
meta: Meta,
},
Language {
name: LanguageName,
meta: Meta,
},
}Expand description
One item of a DoStatement’s dostmt_opt_list — a body string or a LANGUAGE
clause. The two forms and their source order round-trip, so the parser records each as
written rather than folding them into a canonical { language, body } pair.
Variants§
Body
An inline-body Sconst item — PostgreSQL’s makeDefElem("as", …). The body is
the opaque source Literal (kept, not re-parsed, like
FunctionOption::As); there is no AS keyword in the
DO syntax, so the variant is named for the block body it carries.
Fields
Language
A LANGUAGE <name> item — PostgreSQL’s makeDefElem("language", …). The name is a
NonReservedWord_or_Sconst (LanguageName): a bare word or a string constant, as
in the CREATE FUNCTION LANGUAGE clause. A reserved word (a bit/hex/national string
constant, since those are not Sconst) is the syntax error PostgreSQL reports.
Fields
name: LanguageNameName referenced by this syntax.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DoArg
impl<'de> Deserialize<'de> for DoArg
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 DoArg
Source§impl Render for DoArg
impl Render for DoArg
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 moreimpl StructuralPartialEq for DoArg
Auto Trait Implementations§
impl Freeze for DoArg
impl RefUnwindSafe for DoArg
impl Send for DoArg
impl Sync for DoArg
impl Unpin for DoArg
impl UnsafeUnpin for DoArg
impl UnwindSafe for DoArg
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.