query-condition: Register new or list existing query conditions

query-conditionR Documentation

Register new or list existing query conditions

Description

Condition is two-argument function such as '|' or '&' used to combine pair of rules.

Usage

queryCondition(method)

setQueryConditions(..., .queryBuilderConfig = queryBuilderConfig)

listQueryConditions(.queryBuilderConfig = queryBuilderConfig, print = TRUE)

default_conditions

Arguments

method

R function of two parameters that is used to combine a pair of rules.

...

Name-value pairs defining condition name and method respectively. Should be defined with usage of queryCondition function.

.queryBuilderConfig

R6 class object storing query configuration. See queryBuilderConfigClass.

print

Should the list of operators be printed into console?

Format

An object of class list of length 2.

Details

  • queryCondition: defines condition method.

  • setQueryConditions: is used to register the defined conditions in the default or custom queryBuilderConfigClass object.

  • listQueryConditions: returns list of registered conditions.

  • default_conditions: an object storing default definitions for conditions.

Examples

setQueryConditions(
  "XOR" = queryCondition(xor)
)
query <- queryGroup(
  condition = "XOR",
  queryRule("am", "equal", 1),
  queryRule("vs", "equal", 1)
)
queryToExpr(query)


queryBuilder documentation built on Oct. 7, 2024, 1:19 a.m.