I want to do something analogous to SQL's DELETE FROM table1
. There is a remove
function that takes something called a KeyRange
but I'm not sure how to create a KeyRange
that represents "all keys" or if that's even possible.
I can do this:
storage.values("mytable").done(function(result) {
_.each(result, function(r) {
storage.remove("mytable", r._id);
});
});
But not only is that ugly, I'd need to do extra work with promises in order to have a callback that's only executed once all the results are finished deleting.
Any hints?