Table.where() - zuki/Dexie.js GitHub Wiki

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(). The special string ":id" represents the primary key.

Description

Returns a WhereClause based on given index or primary key. The returned WhereClause can be used to build a query on how to extract objects from the database using any of the methods in WhereClause

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

⚠️ **GitHub.com Fallback** ⚠️