creationix / nstore

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

Saving same key twice creates 2 data rows rather than updating existing key #46

Open cbshakumar opened 10 years ago

cbshakumar commented 10 years ago

Hi, If I am attempting to "update" a row of data...if I get a document, then change it and attempt to save it again using the same key....it simply adds a new record to the flat file database. Over time, this causes the flat file database to become huge and unmanageable. I would like a way to update a data row by key that does not cause data to be created needlessly.

josheverett commented 9 years ago

This is a feature of the library, not a bug.

From the readme:

nStore uses a safe append-only data format for quick inserts, updates, and deletes.

nStore is great for prototyping and small private apps. Not a lot else.