Misc Operators
Besides the main categories of operators, ReductStore supports a few miscellaneous operators that provide additional functionality:
Operator | ReductStore Version | Description |
---|---|---|
$has | $exists | v1.14 | Checks if a record has specific labels. |
$cast | v1.14 | Casts a label value to a different type explicitly. |
$ref | v1.14 | References a label value in a record explicitly. |
$timestamp | $id | v1.15 | Retrieves the timestamp of a record as a UNIX time in microseconds. |
$has | $exists
The $has
or $exists
operator is used to check if a record has specific labels.
The operator is useful when you want to filter records based on the presence of a label, regardless of its value.
Syntax
{
"$has" | "$exists" : [ <expression as label reference>, ... ]
}