Declares a typed named expression whose value will be passed separately from the query text. With parameterization, you can separately develop an analytical solution and then launch it sequentially with different input values.
In the case of transactional load, parameters let you avoid recompilation of queries when repeating calls of the same type. This way you can reduce server utilization and exclude compilation time from the total time of query execution.
Passing of parameters is supported in the SDK, CLI, and graphical interfaces.
DECLARE $named-node AS data_type;
$named-node: The name by which you can access the passed value. It must start with
data_typeis the data type represented as a string in the accepted format.
Only serializable data types are allowed:
- Primitive types.
- Optional types.
- Containers, except
Nullare the supported special types.
DECLARE $x AS String; DECLARE $y AS String?; DECLARE $z AS List<String>; SELECT $x, $y, $z;