Module: MappingStorage | Zope-2.2.1-src/lib/python/ZODB/MappingStorage.py | |||||||
---|---|---|---|---|---|---|---|---|
Very Simple Mapping ZODB storage The Mapping storage provides an extremely simple storage implementation that doesn't provide undo or version support. It is meant to illustrate the simplest possible storage. The Mapping storage uses a single data structure to map object ids to data. The Demo storage serves two purposes:
The demo strorage can have a "base" storage that is used in a read-only fashion. The base storage must not not to contain version data. There are three main data structures:
A record is a tuple: oid, serial, pre, vdata, p, where:
The pickle data will be None for a record for an object created in an aborted version. It is instructive to watch what happens to the internal data structures as changes are made. Foe example, in Zope, you can create an external method: import Zope def info(RESPONSE): RESPONSE['Content-type']= 'text/plain' return Zope.DB._storage._splat()
|