pub enum FunctionParamMode {
In,
Out,
InOut,
Variadic,
}Expand description
A routine parameter’s argument mode — PostgreSQL’s arg_class prefix
(func_arg: arg_class param_name func_type | …). IN is the default and may be
omitted; OUT/INOUT mark output parameters; VARIADIC marks a trailing
array-spread parameter. A fieldless Copy tag whose span rides the owning
FunctionParam (the FunctionParamDefaultSpelling precedent): it records only
the written mode so it round-trips.
PostgreSQL admits the mode either before or after the name (IN a int and
a IN int both parse); this models the documented, canonical mode-first spelling
(which sqlparser-rs’s ArgMode also targets) and adds Variadic,
which sqlparser-rs omits but real PostgreSQL requires. The rarer name-first spelling
is a deliberate parse-surface boundary — no corpus exercises it and PostgreSQL itself
normalizes the two orders to one AST.
Variants§
In
IN — an input parameter (the default when omitted).
Out
OUT — an output parameter.
InOut
INOUT — an input/output parameter.
Variadic
VARIADIC — a trailing array-spread parameter.
Trait Implementations§
Source§impl Clone for FunctionParamMode
impl Clone for FunctionParamMode
Source§fn clone(&self) -> FunctionParamMode
fn clone(&self) -> FunctionParamMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more