Interface Condition<T>

The Condition interface defines all existing query filters

Type Parameters

Hierarchy

  • Condition

Methods

  • Adds a filter to this query

    Returns

    The resulting Query

    Parameters

    • field: null | string
    • filter: null | string
    • value: any

    Returns Filter<T>

  • Adds a between filter to the field. This is a shorthand for an less than and greater than filter.

    Returns

    The resulting Query

    Parameters

    • field: string

      The field to filter

    • greaterValue: string | number | Date | Entity

      The field value must be greater than this value

    • lessValue: string | number | Date | Entity

      The field value must be less than this value

    Returns Filter<T>

  • Adds a contains all filter to the collection field

    The collection must contain all the given values.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/all/

    Parameters

    • field: string

      The field to filter

    • Rest ...args: any[]

      The field value or values to filter

    Returns Filter<T>

  • The collection must contains one of the given values

    Adds a contains any filter to the collection field. Alias for in.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/in/

    Parameters

    • field: string

      The field to filter

    • Rest ...args: any[]

      The field value or values to filter

    Returns Filter<T>

  • Adds a equal filter to the field

    All other other filters on the field will be discarded.

    Method

    Parameters

    • field: string

      The field to filter

    • value: any

      The value used to filter

    Returns Filter<T>

  • Adds a equal filter to the field. All other other filters on the field will be discarded

    Returns

    The resulting Query

    Parameters

    • field: string

      The field to filter

    • value: any

      The value used to filter

    Returns Filter<T>

  • Adds a “in” filter to the field

    The field value must be equal to one of the given values.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/in/

    Parameters

    • field: string

      The field to filter

    • Rest ...args: any[]

      The field value or values to filter

    Returns Filter<T>

  • Adds an “in” filter to the field

    The field value must be equal to one of the given values.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/in/

    Parameters

    • field: string

      The field to filter

    • Rest ...args: any[]

      The field value or values to filter

    Returns Filter<T>

  • Adds a “is not null” filter to the field

    The field value must not be null.

    Returns

    The resulting Query

    Parameters

    • field: string

      The field to filter

    Returns Filter<T>

  • Adds a “is null” filter to the field

    The field value must be null.

    Returns

    The resulting Query

    Parameters

    • field: string

      The field to filter

    Returns Filter<T>

  • Adds a regular expression filter to the field

    The field value must matches the regular expression.

    Note: Only anchored expressions (Expressions that starts with an ^) and the multiline flag are supported.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/regex/

    Parameters

    • field: string

      The field to filter

    • regExp: string | RegExp

      The regular expression of the filter

    Returns Filter<T>

  • Adds a modulo filter to the field

    The field value divided by divisor must be equal to the remainder.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/mod/

    Parameters

    • field: string

      The field to filter

    • divisor: number

      The divisor of the modulo filter

    • remainder: number

      The remainder of the modulo filter

    Returns Filter<T>

  • Adds a geopoint based near filter to the GeoPoint field

    The GeoPoint must be within the maximum distance to the given GeoPoint. Returns from nearest to farthest.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/nearSphere/

    Parameters

    • field: string

      The field to filter

    • geoPoint: GeoPoint

      The GeoPoint to filter

    • maxDistance: number

      Tha maximum distance to filter in meters

    Returns Filter<T>

  • Adds a “not in” filter to the field

    The field value must not be equal to any of the given values.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/nin/

    Parameters

    • field: string

      The field to filter

    • Rest ...args: any[]

      The field value or values to filter

    Returns Filter<T>

  • Adds a size filter to the collection field

    The collection must have exactly size members.

    Returns

    The resulting Query

    See

    http://docs.mongodb.org/manual/reference/operator/query/size/

    Parameters

    • field: string

      The field to filter

    • size: number

      The collections size to filter

    Returns Filter<T>

  • An object that contains filter rules which will be merged with the current filters of this query

    Returns

    The resulting Query

    Parameters

    • conditions: JsonMap

      Additional filters for this query

    Returns Filter<T>

Generated using TypeDoc