Enable stores to be used as context managers
Some stores, like the massive_store, create temporary tables. If something is going wrong during the import, those tables will not be deleted, and those tables can be quite big.
It would be nice to make sure that those tables are deleted, and that no matter what happen, the store leaves the database clean.
For that reason, we suggest enable the stores to be used as context managers.
>>> with MyStore(cnx) as store:
... store.prepare_insert_entity("XXX", **kargs)
and on exit, the flush
et finish
methods would be called.