Merge branch 'master' of github.com:louischatriot/nedb

pull/2/head
Louis Chatriot 9 years ago
commit 59792b3aa9
  1. 3
      README.md

@ -273,6 +273,9 @@ db.find({ planet: { $regex: /ar/, $nin: ['Jupiter', 'Earth'] } }, function (err,
#### Array fields
When a field in a document is an array, NeDB first tries to see if the query value is an array to perform an exact match, then whether there is an array-specific comparison function (for now there is only `$size` and `$elemMatch`) being used. If not, the query is treated as a query on every element and there is a match if at least one element matches.
* `$size`: match on the size of the array
* `$elemMatch`: matches if at least one array element matches the query entirely
```javascript
// Exact match
db.find({ satellites: ['Phobos', 'Deimos'] }, function (err, docs) {

Loading…
Cancel
Save