Methods
parse(tokens) → {Object}
Parse the tokens (as an object) and return a parse tree. The condition
must follow the following grammar.
<condition> ::= "{" <comparison> | <null-comparison> | <in-comparison> | <logical-condition> "}" <comparison> ::= <comparison-operator> ":" "{" <column> ":" <value> "}" <null-comparison> ::= <null-comparison-operator> ":" "{" <column> ":" <nullable> "}" <in-comparison> ::= <in-comparison-operator> ":" "{" <column> ":" "[" <value> {"," <value>} "]" "}" <logical-condition> ::= <boolean-operator> ":" "[" <condition> {"," <condition>} "]" <comparison-operator> ::= "$eq" | "$neq" | "$lt" | "$lte" | "$gt" | "$gte" | "$like" | "$notlike" <in-comparison-operator> ::= "$in" | "$notIn" <null-comparison-operator> ::= "$is" | "$isnt" <boolean-operator> ::= "$and" | "$or" <nullable> ::= null | <parameter> <value> ::= <parameter> | <column> | <number> | null <column> ::= <string> <parameter> ::= :<string>
Parameters:
Name | Type | Description |
---|---|---|
tokens |
Array.<Object> | An array of tokens, as created by the ConditionLexer.parse method. |
Returns:
A parse tree. Each node in the tree has a token and
children nodes.
- Type
- Object