Having the example expression `a == 1 | (vs == 0 & qsec > 10)` we can distinct the following rules and groups:
Rules:
- `am == 1` - related to `am` field, applies `==` operator with `1` value,
- `vs == 0` - related to `vs` field, applies `==` operator with `1` value,
- `qsec > 10` - related to `qsec` field, applies `>` operator with `10` value.
Groups:
- `(vs == 0 & qsec > 10)` - combines two rules (`vs == 0` and `qsec > 10`) with `&` condition,
- `a == 1 | (vs == 0 & qsec > 10)` - combines rule `a == 1` and group `(vs == 0 & qsec > 10)` with `|` condition.
Such query can be defined by 'queryBuilder' the following way:
queryGroup(
condition = "OR",
queryRule("am", "equal", 1)
queryGroup(
condition = "AND",
queryRule("vs", "equal", 0),
queryRule("qsec", "greater", 10)
)
)
Connection between conditions and operators names and their R-based counterparts are defined with
queryBuilderConfig class.
The defined query can be then converted to filtering expression with queryToExpr function.