Skip to content

WhereClause

David Fahlander edited this page Mar 12, 2015 · 14 revisions

Represents a filter on an index or primary key.

See Also

Table.where() - the method that returns a WhereClause instance.

Sample

db.friends.where("shoeSize").between(40, 45).count(function(count) {
    console.log("I have " + count + " friends with the shoe size between 40 and 45");
});

Methods

Returns a collection of objects where index is above given key

Returns a collection of objects where index is above or equal given key

Returns a collection of objects where index is equal to any of the keys in given array

Returns a collection of objects where index is below given key

Returns a collection of objects where index is below or equal given key

Returns a collection of objects where index is between given boundaries

Returns a collection of objects where index equals given key

Returns a collection of objects where index equals given string-key ignoring case differencies

Returns a collection of objects where index starts with given string-key

Returns a collection of objects where index starts with given string-key ignoring case differencies

Clone this wiki locally