示例#1
0
 def extras(self):
     from aiida.backends.djsite.db.models import DbExtra
     if self._to_be_stored:
         return
     else:
         extraslist = DbExtra.list_all_node_elements(self.dbnode)
     for e in extraslist:
         yield e.key
示例#2
0
 def iterextras(self):
     from aiida.backends.djsite.db.models import DbExtra
     if self._to_be_stored:
         # If it is not stored yet, there are no extras that can be
         # added (in particular, we do not even have an ID to use!)
         # Return without value, meaning that this is an empty generator
         return
     else:
         extraslist = DbExtra.list_all_node_elements(self.dbnode)
         for e in extraslist:
             yield (e.key, e.getvalue())
示例#3
0
 def _db_iterextras(self):
     from aiida.backends.djsite.db.models import DbExtra
     extraslist = DbExtra.list_all_node_elements(self.dbnode)
     for e in extraslist:
         yield (e.key, e.getvalue())