Class Query

An object used to filter input documents

The condition for constructing predicates

Options for use by operators

Constructors

Methods

Constructors

Methods

  • Returns a cursor to select matching documents from the input source.

    Type Parameters

    • T

    Parameters

    • collection: Source
    • Optionalprojection: AnyObject

      An optional projection criteria

    Returns Cursor<T>

    A Cursor for iterating over the results

  • Remove matched documents from the collection returning the remainder

    Type Parameters

    • T

    Parameters

    • collection: T[]

      An array of documents

    Returns T[]

    A new array with matching elements removed

  • Checks if the object passes the query criteria. Returns true if so, false otherwise.

    Type Parameters

    • T

    Parameters

    • obj: T

      The object to test

    Returns boolean

    True or false