data_baseisf_data_baseLoaderWrapper

LoaderWrapper

class data_base.isf_data_base.LoaderWrapper(relpath)

This is a pointer to data, which is stored elsewhere.

It is used by ISFDataBase, if data is stored in a subfolder of the data_base.basedir folder. It is not used, if the data is stored directly in the sqlite database.

The process of storing data in a subfolder is as follows:

  1. The subfolder is generated using the mkdtemp method

  2. the respective dumper puts its data there

  3. the dumper also saves a Loader.pickle file there. This contains an object with a get method (call it to restore the data) and everything else necessary to recover the data

  4. A LoaderWrapper object pointing to the datafolder with a relative

    path (to allow moving of the database) is saved under the respective key in the data_base

The process of loading in the data is as follows:

  1. the user request it: db['somekey']

  2. the LoaderWrapper object is loaded from the backend sql database

  3. the Loader.pickle file in the respective folder is loaded

  4. the get-methdod of the unpickled object is called with the absolute path to the folder.

  5. the returned object is returned to the user