pub enum SetParameterValue {
Literal {
literal: Literal,
meta: Meta,
},
Name {
name: Ident,
meta: Meta,
},
Parameter {
kind: ParameterKind,
meta: Meta,
},
List {
values: ThinVec<SetParameterValue>,
meta: Meta,
},
}Expand description
One value in a SET value list: a literal, a bareword name, a parameter, or a
DuckDB bracketed list of values.
PostgreSQL accepts numbers, strings, and barewords such as on/off/iso
here; arbitrary expressions are not valid, so the value is this restricted
literal-or-name shape rather than an Expr. A leading sign on a
numeric value (PG NumericOnly, e.g. -1) is folded into the numeric
Literal’s span rather than modelled as a unary operator.
PostgreSQL also admits a positional parameter such as $1 as a var_value.
DuckDB additionally admits a bracketed list value (List) —
SET allowed_paths = ['a', 'b'], SET allowed_directories = [] — reusing the same
[…] collection-literal syntax DuckDB accepts in expression position (gated by the
same ExpressionSyntax::collection_literals, the
one dialect for which [ opens a list rather than a quoted identifier). Its elements
are again this restricted value grammar (so nesting is expressible), not a general
Expr: DuckDB’s parser accepts richer element expressions but rejects
them at bind, past this validator’s parse-level contract.
Variants§
Literal
A literal value (a number or string).
Fields
Name
A bareword name value (on/off/iso/…).
Parameter
A prepared-statement parameter accepted by the active dialect’s parameter
syntax, such as PostgreSQL’s positional $1.
Fields
kind: ParameterKindPlaceholder identity and spelling.
List
A DuckDB bracketed list value (['a', 'b'], []). Empty when the list was
[]; the elements are the same restricted value grammar, so a nested list is
representable.
Fields
values: ThinVec<SetParameterValue>Values in source order.
Trait Implementations§
Source§impl Clone for SetParameterValue
impl Clone for SetParameterValue
Source§fn clone(&self) -> SetParameterValue
fn clone(&self) -> SetParameterValue
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 SetParameterValue
impl Debug for SetParameterValue
Source§impl<'de> Deserialize<'de> for SetParameterValue
impl<'de> Deserialize<'de> for SetParameterValue
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 SetParameterValue
Source§impl Hash for SetParameterValue
impl Hash for SetParameterValue
Source§impl PartialEq for SetParameterValue
impl PartialEq for SetParameterValue
Source§impl Render for SetParameterValue
impl Render for SetParameterValue
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 SetParameterValue
impl Serialize for SetParameterValue
Source§impl Spanned for SetParameterValue
impl Spanned for SetParameterValue
impl StructuralPartialEq for SetParameterValue
Auto Trait Implementations§
impl Freeze for SetParameterValue
impl RefUnwindSafe for SetParameterValue
impl Send for SetParameterValue
impl Sync for SetParameterValue
impl Unpin for SetParameterValue
impl UnsafeUnpin for SetParameterValue
impl UnwindSafe for SetParameterValue
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.