creationix / nstore

nStore is a simple, in-process key/value database for node.js
MIT License
392 stars 31 forks source link

add some kind of 'find' wrapper ? #1

Closed weepy closed 14 years ago

weepy commented 14 years ago

It would be handy to have a shortcut for the find stuff. E.g. something like

users.find(function(doc, meta) {
   return doc.age > 18 && doc.age < 40;
}, function(results) { 
  // Do something with all the documents
})
creationix commented 14 years ago

That's what the all() function does.

creationix commented 14 years ago

Oh, I see, it's not in the docs. Will add...

weepy commented 14 years ago

your addition to the docs is says "stream" rather than "all" ?

creationix commented 14 years ago

Thanks. It was a very busy day yesterday. I released 2.5 projects.

creationix commented 14 years ago

I assume this issue is resolved now.