pub enum LanguageName {
Word {
word: Ident,
meta: Meta,
},
String {
value: Literal,
meta: Meta,
},
}Expand description
A routine LANGUAGE <name> operand (PostgreSQL’s NonReservedWord_or_Sconst): a bare
non-reserved word or a string constant. Shared by the two positions that spell it the same
way — the DoStatement DO … LANGUAGE <name> argument and the CREATE FUNCTION
FunctionOption::Language clause. PostgreSQL folds both
spellings to the same language name internally, but the surface form is kept distinct so it
round-trips — the same NonReservedWord_or_Sconst shape as
ExtensionVersion.
The string arm admits only an Sconst (a plain, E'...', U&'...', or dollar-quoted
constant); a bit-string (b'...'/x'...') or national (N'...') constant is not an
Sconst, so — like the code-block body — it is the syntax error PostgreSQL reports. The
string spelling is a PostgreSQL surface: MySQL’s routine LANGUAGE admits only the bare
word SQL (LANGUAGE 'SQL' is ER_PARSE_ERROR on mysql:8), so the parser gates the string
arm on IndexAlterSyntax::routine_language_string.
Variants§
Trait Implementations§
Source§impl Clone for LanguageName
impl Clone for LanguageName
Source§fn clone(&self) -> LanguageName
fn clone(&self) -> LanguageName
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 LanguageName
impl Debug for LanguageName
Source§impl<'de> Deserialize<'de> for LanguageName
impl<'de> Deserialize<'de> for LanguageName
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 LanguageName
Source§impl Hash for LanguageName
impl Hash for LanguageName
Source§impl PartialEq for LanguageName
impl PartialEq for LanguageName
Source§impl Render for LanguageName
impl Render for LanguageName
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 LanguageName
impl Serialize for LanguageName
impl StructuralPartialEq for LanguageName
Auto Trait Implementations§
impl Freeze for LanguageName
impl RefUnwindSafe for LanguageName
impl Send for LanguageName
impl Sync for LanguageName
impl Unpin for LanguageName
impl UnsafeUnpin for LanguageName
impl UnwindSafe for LanguageName
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.