Collection.eachUniqueKey()
Syntax
collection.eachUniqueKey(callback)
Parameters
Callback Parameters
key: Object
Found key
cursor: IDBCursor
The cursor of the object being iterated.
Return Value
Promise
Remarks
When iteration finish, returned Promise will resolve with undefined, calling any Promise.then() callback.
If operation fails, returned promise will be rejected, calling any Promise.catch() callback.
Sample
db.friends.orderBy('firstName').eachUniqueKey(function (firstName) {
// This callback will be called once for each unique firstName in DB no matter
// if having multiple friends with same name.
});