msiemens
Regards locking, I just meant that purging operations are ignored by the api. Look I can see how this does not work. You have no way to save the information yourself reliability enough to publish as part of the api. With the wrapper I am writing, I have included a AdminTable class, I will try to write the functionality into it. At the moment, is very simple, just a single table called 'Admin'. Idea being that every dict has a _type. Only one type at the moment. But I will put some attrs for can_purge db, tables etc the reason to to have the rec_type, was maybe for some logging operations. Not sure. Will see how it pans out.
The db.open() was more just for clarity. I know you can call db.close() without errors if it's not open. but the check just makes the code more clear, I think
I also did a backup method in the wrapper. Super simple for now...
def backup(self):
self.close()
backup_file = self.fn + '.bak'
shutil.copyfile(self.fn, backup_file)
The self.close is there because I am also caching single inserts. So that call also flushes the cache. But yes very simple.