StaticParserInternally used Parser. Exported to allow new operations. To add a new operator use:
ComplexQuery.Parser.prototype.operators[<name>] = <operator definition>
Normalized syntax tree of the query.
StaticfindFunction to find matching ASTNodes in the AST.
query to parse
query options
name of operator to find
OptionalpropertyName: stringname of property referenced by the operator
array of matching ASTNodes or an empty array if nothing is found.
StaticisFunction to test if a given query is a complex query.
expression
OptionalqueryOptions: ComplexQueryOptionsoptions
true if the expression is a complex query, otherwise false.
StaticparseFactory method to create a ComplexQuery.
Optionalquery: ComplexQueryExpressionOptionalqueryOptions: ComplexQueryOptionsStaticusesFunction to test if an operator is used within a given query.
a complex query expression
query options
name of operator to find
OptionalpropertyName: stringname of property referenced by the operator
true if the operator is detected in the query.
Function to encode the AST back into a ComplexQuery object literal.
Interpreter and test engine for ComplexQueryExpressions.
Example