rk.where: Process Where Clause

Description Usage Arguments Value

View source: R/rklib.r

Description

The function parses the where clause and returns the modified string as per the specified mode. The where clause supported format is represented by the following BNF:

1
2
3
4
5
6
7
8
<where.cond> := <where.and> [ LOGICAL.OR <where.cond> ]
<where.and> := <where.not> [ LOGICAL.AND <where.and> ]
<where.not> := [ LOGICAL.NOT ] <where.clause>
<where.clause> := LEFT.PAREN <where.cond> RIGHT.PAREN | <where.expr>
<where.expr> := ( IDENTIFIER | QUOTE.STR ) ( [ LOGICAL.NOT ] ( OPERATOR.IN <value.list> | OPERATOR.LIKE <value.const> ) | OPERATOR.IS [ LOGICAL.NOT ] VALUE.NULL | <logic.cond> )
<logic.cond> := ( EQUAL.TO | NOT.EQUAL | LESS.THAN | GREATER.THAN | LESS.EQUAL | GREATER.EQUAL ) <value.const>
<value.list> := LEFT.PAREN <value.const> ( DELIMIT.COMMA <value.const> ) * RIGHT.PAREN
<value.const> := | QUOTE.STR | NUMBER

Usage

1
rk.where(where = NULL, mode = "@", fields = NULL)

Arguments

where

clause following simplified sql syntax.

mode

specifies the parsing logic. The default value '@' returns the where clause in perfmeter format. The '=' value returns the where clause in IOD format. The '~' value returns the where clause in Jira format. The ” (empty string) value returns a where clause used with a sql statement. If a dataframe name is passed, the function returns the where clause for use with a dataframe.

fields

fields to be filtered.

Value

The function returns the processed where clause.


nJira documentation built on March 26, 2020, 7:56 p.m.