...
The query language
...
The query language ressembles the SQL language and allows powerful queries. A typical example would be:
...
General features | |||||
---|---|---|---|---|---|
= == | Compare field with a value. You can use both "=" and "==". These and other operators can be used with most field types.
Use double quotes with strings. Inside a string literal, a double quote is written as two consecutive double quotes:
| ||||
>, < >=, <= | To compare numeric field values and dates.
| ||||
!= <> | Not equal operators. Both have the same function. | ||||
AND && | Boolean "and" to combine conditions.
| ||||
OR || |
| ||||
!= | Not equal.
| ||||
( ) | Brackets can be used to combine multiple conditions:
| ||||
! NOT | Negation:
| ||||
x ? y : z | Evaluates y if x is true, evaluates z if x is false.
| ||||
null | Literal to evaluate if a field is null or not:
| ||||
Numbers | |||||
+ - * / | Numeric operators.
| ||||
Decimals | Decimal fields use the optional '.' (dot) decimal point:
| ||||
Strings | |||||
.StartsWith .EndsWith .Contains | Various operators to search string fields by prefix, suffix or infix. Use NOT to negate.
| ||||
.Length | To query by string length:
| ||||
Dates | You can use the DateTime object to compare dates. | ||||
To compare a date:
Or with hours, minutes and seconds:
|
...
Basic | Exact numeric match:
Range match:
The operators can be any of: >, <, >=, <=, =, !=
| Null values | ||||
Find Any of | This construct matches if the field matches any one of the pipe separated values:
| |||||
Null values | Find null values with fields that are nullable:
|
...
Decimals filtering
Basic | Like with numeric fields, you can do different comparisonsSummary | You can use all the features also available with number filters. Please always use the "." (dot) character for the decimal point. The decimal point is optional. Examples:
|
Date filtering
Basic | Like with numeric fields, you can do different comparisons:
Important:
| |||||
Date formats | Formats that are supported are:
Note: Partial date/times are automatically expanded. Example: "2018" is converted to 2018-01-01 00:00 | |||||
Null values | Find null values with fields that are nullable:
| Filter day or month | All deadlines on a day (UTC)
| |||
Filter day or month | All deadlines on a day (UTC):
All deadlines in a month (UTC):
| |||||
Date offsets | Sometimes it is easier to filter by a date offset. For example: Find jobs with a deadline of tomorrow. This can be expressed with "1d". More examples:
You can thus use one or more combinations of:
Deadline within +/- 6 hours:
All objects created since 1 year and 6 months:
|
Date offset filtering
Date offsets | Sometimes it is easier to filter by a date offset. For example: Find jobs with a deadline of tomorrow. This can be expressed with "1d". More examples:
Deadline within +/- 6 hours:
| 2018
| 10-25
| 2018-10-26
|
All | deadlines in a month (UTC)objects created since 1 year and 6 months:
| deadline
| 2018
| 10
| AND {deadline}.Matches("2018-11", "<")
|||||||||||||
Units | You can thus use one or more combinations of:
You can prefix offset with "-" for dates into the past: -1y stands for one year ago. You can prefix with optional "+" for dates into the future: +1y (or 1y) stands for one year from now. |
Boolean filtering
Basic | Valid examples:
Permitted operators are: "=" and "!=".
|
...
Filter label options | Write like this:
You can also use the optional operator:
If a label is not shown by default, it can also have the "null" option:
| ||||||
Exclude label options | Write like this:
If a label is not shown by default, it can also have the "null" optionalso have the "null" option:
| ||||||
Any label option | To filter for data where the label has any of the options:
| ||||||
Comments | When specifying a single value, the quotes are optional.
|
Query tree
When running queries the results may include a JSON representation of your query.
...