Skip to content

Table.where()

David Fahlander edited this page Apr 9, 2014 · 15 revisions

Start filtering the object store by creating a WhereClause instance.

Syntax

table.where(indexOrPrimaryKey)

Parameters

indexOrPrimaryKey: String Name of an index or primary key registered in Version.stores(). Special string ":id" will always represent the primary key.

Return Value

WhereClause

Sample

 db.friends.where("name").equalsIgnoreCase("david").each(function (friend) {
     console.log("Found: " + friend.name + ". Phone: " + friend.phoneNumber);
 }).catch(function (error) {
     console.error(error);
 });

See Also

WhereClause

Clone this wiki locally