Skip to content

[Question] Reload database / cancel changes #929

@HanimHank

Description

@HanimHank

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions