ForerunnerDB icon indicating copy to clipboard operation
ForerunnerDB copied to clipboard

Eager saving mode?

Open YurySolovyov opened this issue 10 years ago • 6 comments

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.

YurySolovyov avatar May 09 '15 13:05 YurySolovyov

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

Irrelon avatar May 10 '15 09:05 Irrelon

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.

YurySolovyov avatar May 10 '15 10:05 YurySolovyov

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 :)

Irrelon avatar May 12 '15 10:05 Irrelon

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

YurySolovyov avatar May 12 '15 10:05 YurySolovyov

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.

Irrelon avatar Feb 16 '16 11:02 Irrelon

Hey great news,

I hope to see this on browser side soon.

Thanks a lot.

no-more avatar Apr 11 '16 17:04 no-more