You can insert parameter references in the RAQL and SQL statements of the BigMemory Max, JDBC, Terracotta, and RAQL Inline operators. They are represented by a colon, followed by the parameter name. If the name contains special characters, it must be enclosed in double quotes.
JDBC parameters
Parameters are handed over to the database server as typed values along with the SQL statement at execution time. Before a statement is handed over to the database server, it is rewritten to use JDBC parameter markers ('?') as follows:
Example
SELECT * FROM table WHERE column IN (:list)
with 3 elements in the list is rewritten to
SELECT * FROM table WHERE column IN (?,?,?)
The last rule provides a valid SQL statement for an empty list. Note that if the list of values is empty, both IN and NOT-IN predicates return the same result: UNKNOWN and not FALSE.
RAQL parameters
Parameters are handed over to the RAQL engine as typed values along with the RAQL statement at execution time. RAQL statements are usually passed unchanged to the RAQL engine. If they contain list parameters, they are rewritten to use single value parameters as follows:
Example
SELECT * FROM feed1 WHERE column IN (:list)
with 3 elements in the list is rewritten to
SELECT * FROM feed1 WHERE column IN (:"list[1]","list[2]","list[3]")
In this case, "list[1]" etc. are generated names for the individual list elements.
The last rule provides a valid RAQL statement for an empty list. Note that if the list of values is empty, both predicates IN and NOT-IN return the same result UNKNOWN and not FALSE.