Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.

Sqlite mapper

juannavascalvente edited this page May 24, 2016 · 4 revisions

Scipion objects can be composed of several attributes and when an object is stored in the database it is necessary to store every attribute of the object. The attributes of an object can be single python objects (such integer or float) or other objects that are also composed of several attributes (that is, objects can be nested). This mapper is meant to store objects that can be thought of as structures with fields or other structures inside it.

Every subclass (set, list, pointer, etc...) of the class object has its own attributes, and also new attributes can be added dynamically to any instance of a subclass. If a new attribute is added to the subclass it is treated as it was declared in the subclass definition. When an object is stored in the database, all its attributes are “discovered” from the object instance and stored one per row in the database.

Clone this wiki locally