Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
We need to support external statement parameters in SQL++. They can be of three kinds:
1) Named parameters, referred as: $name
2) Positional parameters, referred as: $n where n is an integer, >= 1
3) Positional parameters, referred as ?, which are treated as $1, ... $n in the order in which they appear in the statement.
Parameters should be assignable through the statement execution API (/query/service).
For each named parameter there should be a request parameter "$name" which contains the parameter's JSON value.
Positional parameters are passed in "args" request parameter which should be a JSON array containing parameter values.
Statement parameters should be inlined at query compilation time, so they do not impact query optimization.
It's an error if a statement parameter is referred by a query but its value is not provided in the API request.