|
Post by wiverson on Nov 30, 2021 22:34:44 GMT
Does SimpleSQL support sqlite session? sqlite.org/sessionintro.htmlI'm interested in using this to implement undo/redo functionality on the data model, looks like this is a nice way to do it...?
|
|
|
Post by echo17 on Dec 1, 2021 13:51:56 GMT
I don't have any experience with SQLite sessions, so I'm not sure how to implement them. If you are just looking for Undo/Redo functionality, you could make a backup of the database before making changes. Then to undo, you'd just point the current database to the appropriate file and re-initialize. Be sure you call Close and Dispose methods on the SimpleSQLManager before reloading with Intialize(true); pseudocode: // close the database dbManager.Close(); dbManager.Dispose();
// backup your current file before making changes BackupFileMethod();
// re-initialize the database dbManager.Initialize(true);
undo/redo pseudocode: // close the database dbManager.Close(); dbManager.Dispose();
// set the new database (either going back on the stack for Undo, or forward for Redo) dbManager.databaseFile.name = newDatabaseFileName;
// re-initialize dbManager.Initialize(true);
See this FAQ for more information: FAQ
|
|