Recommend this page to a friend! |
Classes of Xavier Pérez | XMongoDB | doc/3-advanced-select-operations.md | Download |
|
DownloadAdvanced Select OperationsWhere OptionsOperators !=, <, >, <=, >=References: http://docs.mongodb.org/manual/reference/operator/query-comparison/ Where Not Equal
Where Lower Than
Where Lower Or Equal Than
Where Greater Than
Where Greater Or Equal Than
Where InFinds in 'myfield1' a set of possible values
Where Not InFinds in 'myfield1' where a set of possible values is not found
Where BetweenFinds in 'myfield1' between two values (including equal)
For char dates
For ISODates, must to be converted to ISODate
Where Not BetweenFinds in 'myfield1' between two values (not including equal)
Like OptionsReferences: http://docs.mongodb.org/manual/reference/operator/query/regex/ Normal Like
Params: - flags:
- disable_start_wildcard
- disable_end_wildcard
Not Like
Finds in 'myfield1' that not contains 'value1', 'value2' neither 'value3' Other OptionsDistinctDistinct can only select only one unique field or subdocument. If the field is a subdocument will return all different subdocuments. Returns an array of distinct values.
Return an array of differentes 'myfield2' found. References: http://docs.mongodb.org/manual/reference/operator/query/regex/ CountCount all documents in a collection
Returns an integer Count All ResultsCount all documents in a collection using where, limit and offset
Returns an integer References: http://docs.mongodb.org/manual/reference/method/db.collection.count/ |