[ZODB-Dev] FileStorage modification help

Dieter Maurer dieter@handshake.de
Tue, 8 Apr 2003 20:38:09 +0200


fritz steindl wrote at 2003-4-7 18:03 +0200:
 > ...
 >     ------------------------------------------------------------------
 >     def store(self, oid, serial, data, version, transaction):
 >     ------------------------------------------------------------------
 > 
 > can somebody please help me with the type of 'data' in this call
 > in other words - what to do with 'data' that i get a valid python structure

The storage abstraction stipulates that is is an opaque sequence
of bytes.

ConflictResolution breaks the abstraction and reveals that it
is composed of two pickled objects.
The first object describes the object's class the second one
its state.

The class is usually coded as a tuple: module name, class name
but can also take another format.

Look at the ConflictResolution code to learn more.


Dieter