Members
-
<static> $all
-
$all
checks to see if all of the members of the query are included in an array{array: {$all: [val1, val2, val3]}}
- Source:
Example
-
<static> $and
-
Returns true if all of the conditions of the query are met
{$and: [query1, query2, query3]}
- Source:
Example
-
<static> $elemMatch
-
This is like $all except that it works with an array of objects or value. It checks to see the array matches all
of the conditions of the query{array: {$elemMatch: {path: value, path: {$operation: value2}}}
- Source:
Example
-
<static> $eq
-
$eq
performs a===
comparison by comparing the value directly if it is an atomic value.
otherwise if it is an array, it checks to see if the value looked for is in the array.{field: value}
or{field: {$eq : value}}
or{array: value}
or{array: {$eq : value}}
- Source:
Example
-
<static> $exists
-
$exists
Sees if a field exists.{field: {$exists: true|false}}
- Source:
Example
-
<static> $gt
-
$gt
Sees if a field is greater than the value{field: {$gt: value}}
- Source:
Example
-
<static> $gte
-
$gte
Sees if a field is greater than or equal to the value{field: {$gte: value}}
- Source:
Example
-
<static> $in
-
$in
Sees if a field has one of the values in the query{field: {$in: [test1, test2, test3,...]}}
- Source:
Example
-
<static> $lt
-
$lt
Sees if a field is less than the value{field: {$lt: value}}
- Source:
Example
-
<static> $lte
-
$lte
Sees if a field is less than or equal to the value{field: {$lte: value}}
- Source:
Example
-
<static> $mod
-
Checks equality to a modulus operation on a field
{field: {$mod: [divisor, remainder]}}
- Source:
Example
-
<static> $ne
-
$ne
performs a!==
comparison by comparing the value directly if it is an atomic value. Otherwise, if it is an array
this is performs a "not in array".
'{field: {$ne : value}}or '{array: {$ne : value}}
- Source:
Example
-
<static> $nin
-
$nin
Sees if a field has none of the values in the query{field: {$nin: [test1, test2, test3,...]}}
- Source:
Example
-
<static> $nor
-
Returns true if none of the conditions of the query are met
{$nor: [query1, query2, query3]}
- Source:
Example
-
<static> $not
-
Logical NOT on the conditions of the query
{$not: [query1, query2, query3]}
- Source:
Example
-
<static> $or
-
Returns true if any of the conditions of the query are met
{$or: [query1, query2, query3]}
- Source:
Example
-
<static> $regex
-
Performs a regular expression test againts the field
{field: {$regex: re, $options: reOptions}}
- Source:
Example
-
<static> $size
-
Compares the size of the field/array to the query. This can be used on arrays, strings and objects (where it will count keys)
{'field|array
: {$size: value}}`- Source:
Example