Skip to content

Please add support for retrieving keys #21

Open
@repalogic

Description

@repalogic

The current implementation only supports to retrieve values in getAll, each, etc. Please also add methods to retrieve the keys in combination with the values as the keys are necessary for example for deletion, e.g.:

ObjectStore.prototype.getAllKeyValues = function() {
   var defer;
   defer = this.defer();
    if (this.store.getAll) {
       defer.resolveWith(this.store.getAll());
    } else {
       this._mapCursor(defer, function(cursor) {
         return {key:cursor.key, value:cursor.value};
        });
    }
     return defer.promise;
};

Just provide a map with "key" and "value" attributes.

Mathias

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions