OQL Parameters

Last modified: April 20, 2023

1 Introduction

Currently, parameters are only supported within OQL queries defined in datasets. To use a defined parameter in a query, use the $ sign.

2 Examples

Examples of correct parameter names are $weight_range, $age.

If a parameter value is not set in an OQL query, that part of the statement is ignored. For example, in the following query:

1
2
3
4
5
6
SELECT Name
FROM Module.Person
WHERE
    Age > $param 
    AND
    Active = true

If the value of $param is not provided, the query will be equivalent to:

1
2
3
4
SELECT Name
FROM Module.Person
WHERE
    Active = true

The example above is different from the case where the value of $param is provided, but is NULL. In that case, the query will be equivalent to:

1
2
3
4
5
6
SELECT Name
FROM Module.Person
WHERE
    Age > NULL
    AND
    Active = true