示例#1
0
 def store(self, ob):
     writer = IWriter(ob)
     self._objects[ob._p_oid] = {
         'state': writer.serialize(),
         'zoid': ob._p_oid,
         'tid': 1,
         'id': writer.id,
         'children': self._objects.get(ob._p_oid, {}).get('children', {})
     }
     if ob.__parent__ and ob.__parent__._p_oid in self._objects:
         self._objects[ob.__parent__._p_oid]['children'][ob.id] = ob._p_oid
示例#2
0
 def store(self, ob):
     writer = IWriter(ob)
     self._objects[ob._p_oid] = {
         'state': writer.serialize(),
         'zoid': ob._p_oid,
         'tid': 1,
         'id': writer.id,
         'children': self._objects.get(ob._p_oid, {}).get('children', {})
     }
     if ob.__parent__ and ob.__parent__._p_oid in self._objects:
         self._objects[ob.__parent__._p_oid]['children'][ob.id] = ob._p_oid
示例#3
0
 def store(self, oid, old_serial, writer, ob, txn):
     writer = IWriter(ob)
     self._objects[ob.__uuid__] = {
         "state": writer.serialize(),
         "zoid": ob.__uuid__,
         "tid": 1,
         "id": writer.id,
         "children": self._objects.get(ob.__uuid__, {}).get("children", {}),
     }
     if ob.__parent__ and ob.__parent__.__uuid__ in self._objects:
         self._objects[ob.__parent__.__uuid__]["children"][ob.id] = ob.__uuid__