Abstraction of queries, so that their implementation can be replaced as needed.

Constructors

Accessors

Methods

  • Adds a resource type prefix to the query value if it's not already present. If the query is empty, sets the value to the provided prefix. If the prefix is already present at the start of the value, returns the query unchanged. Otherwise, prepends the prefix followed by the delimiter to the existing value.

    Parameters

    Returns Query

    this Query instance with the updated value

  • Parameters

    • query: Query

      the query that should be compared

    Returns boolean

    true if and only if the queries are equal. Returns false if the queries are not equal, or if attempting to tell the queries apart is too complicated. More specifically the method can always tell apart empty queries and if both queries are non-empty then their values are compared.

  • Combines multiple queries into one with the provided operator.

    Parameters

    • queries: Query[]

      queries that should be combined. Empty queries in the input array are ignored.

    • operator: BooleanOperator

      operator that is used to combine the queries

    Returns Query

    a single query that is the combination of the non-empty queries in the input array. If the input array is empty an [empty query]Query#emptyQuery will be returned.