Collection
Construction
Samples
// each()
var collection = db.friends.where('name').equalsIgnoreCase('david');
collection.each(function(friend) {
console.log('Found: ' + friend.name + ' with phone number ' + friend.phone);
});// toArray()
db.friends.where('name').startsWithIgnoreCase('d').toArray(function(friends) {
console.log("Found: " + friends.length + " friends starting with d");
});// offset/limit
db.friends
.where('age').above(25)
.offset(10)
.limit(10)
.toArray(function (friends) {
console.log(friends.map(JSON.stringify).join('\n'));
});Methods
Last updated