Collection.eachUniqueKey() - zuki/Dexie.js GitHub Wiki
collection.eachUniqueKey(callback)
callback: Function | function (key, cursor) { } |
key: Object | Found key |
cursor: IDBCursor | The cursor of the object being iterated. |
When iteration finish, returned Promise will resolve with undefined, calling any Promise.then() callback.
If operation fails, returned promise will reject, calling any Promise.catch() callback.
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.
});