Class

OsduQueryExpression

OsduQueryExpression(statement)

Class to build OSDU query expressions from strings or by concatenating two other OSDU query expressions

  • Serves as a builder for the text queries within the OSDU query syntax
Constructor

# new OsduQueryExpression(statement)

Constructor for free-form query expressions

  • Often used for base expressions such as data.ResourceID:\"...\"
Parameters:
Name Type Description
statement string

A string statement representing a single boolean query statement

View Source models/query/osduQueryExpression.js, line 8

Methods

# static FromOperator(boolean_operator, left_expression, right_expression) → {OsduQueryExpression}

Builder method to simplify the concatenation of multiple query expressions while providing clear scoping boundaries

Parameters:
Name Type Description
boolean_operator string

The concatenating operator. Accepts "AND" or "OR"

left_expression OsduQueryExpression

The query expression on the left hand side of the boolean operator

right_expression OsduQueryExpression

the query expression on the right hand side of the boolean operator

View Source models/query/osduQueryExpression.js, line 29

The resulting compound query expression generated by concatenating the provided query expressions

# toString() → {string}

Stringification method used to convert the expression to a string when formulating the API query statement

View Source models/query/osduQueryExpression.js, line 51

The string representation of the query statement

string