creationix / nstore

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

Fix remove. #30

Closed stuarts closed 11 years ago

stuarts commented 13 years ago

The document was being deleted off of the index on the checkQueue update.

But the iterator wasn't being nulled so if(value !== undefined) wasn't preventing the document's index from being re-set on self.index and subsequent query.all's were failing.

I just added a value = undefined to the delete logic.

dr-BEat commented 12 years ago

Nice! This one saved my day. Thanks!

flosse commented 12 years ago

+1

rc1 commented 12 years ago

ditto +1 thanks!

gulian commented 11 years ago

Thanks @stuarts !

@creationix it should be nice to update your npm repository with this pull request :wink:

creationix commented 11 years ago

Published as nstore@0.5.2! Thanks for the fix. I had high hopes for nStore and then never had time to fix all the data corruption bugs. Maybe it will become useful yet.

stuarts commented 11 years ago

Your welcome! Thanks for the great project, I bet it has saved a bunch of time for people over the years who would otherwise have rolled their own solution. It is in that sweet spot of simplicity and feature set.

On Tue, Apr 2, 2013 at 6:28 AM, Tim Caswell notifications@github.comwrote:

Published as nstore@0.5.2! Thanks for the fix. I had high hopes for nStore and then never had time to fix all the data corruption bugs. Maybe it will become useful yet.

— Reply to this email directly or view it on GitHubhttps://github.com/creationix/nstore/pull/30#issuecomment-15774767 .