Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for retrieving keys #21

Open
repalogic opened this issue Apr 10, 2015 · 1 comment
Open

Please add support for retrieving keys #21

repalogic opened this issue Apr 10, 2015 · 1 comment

Comments

@repalogic
Copy link

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

@bramski
Copy link
Owner

bramski commented Apr 28, 2015

Open a pull request if you would like this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants