Irrelon / ForerunnerDB

A JavaScript database with mongo-like query language, data-binding support, runs in browsers and hybrid mobile apps as a client-side DB or on the server via Node.js!
http://www.irrelon.com
721 stars 72 forks source link

Eager saving mode? #41

Open YurySolovyov opened 9 years ago

YurySolovyov commented 9 years ago

It would be great if collections supported eager saving node, in which insertion, updates and deletion of documents were persisted immediately. This would be async, so promise could be returned.

Irrelon commented 9 years ago

This makes sense, probably more in Node.js than the browser but both would benefit depending on the application I suppose.

YurySolovyov commented 9 years ago

Indeed, I working with electron, which is chromium with integrated node API, and I have some data which I need to be saved right away, so it can survive app crash or some unexpected exit.

Irrelon commented 9 years ago

This is now a planned enhancement. It is so easy to implement that it will probably make it's way into the next revision build :)

YurySolovyov commented 9 years ago

Thanks! This would remove a couple of lines of code for me :)

Irrelon commented 8 years ago

Hi ya, just an update that you can now enable this on the Node.js side by doing db.persist.auto(true). Browser-side will get the update soon.

no-more commented 8 years ago

Hey great news,

I hope to see this on browser side soon.

Thanks a lot.