#929·LokiJS

[Question] Reload database / cancel changes

Author: HanimHankCreated Apr 23, 2023Updated May 23, 2023

I'm using lokijs with auto save off, and saving the database using db.saveDatabase() after certain actions.

Suppose I make a few changes and want to discard them. I don't call saveDatabase(), but the data stays in-memory, for the duration of the work session, I believe.

Instead of manually undoing the changes, is there a way to revert the database to the previously saved state? Or clear the in-memory changes?

Thank you so much!