-
-
Notifications
You must be signed in to change notification settings - Fork 641
Table.where()
David Fahlander edited this page Mar 12, 2015
·
15 revisions
Start filtering the object store by creating a WhereClause instance.
table.where(indexOrPrimaryKey)
indexOrPrimaryKey: String | Name of an index or primary key registered in Version.stores(). Special string ":id" will always represent the primary key. |
Returns a WhereClause based on given index or primary key. The returning WhereClause can be used to build a query on how to extract objects from the database using any of the methods in WhereClause
db.friends.where("name").equalsIgnoreCase("david").each(function (friend) {
console.log("Found: " + friend.name + ". Phone: " + friend.phoneNumber);
}).catch(function (error) {
console.error(error);
});
Dexie.js - minimalistic and bullet proof indexedDB library