zlmdb._schema

Classes

Schema

ZLMDB database schema definition.

Slot

LMDB database slot. A slot is defined just by the convention of using

Module Contents

class Schema[source]

Bases: object

ZLMDB database schema definition.

SLOT_DATA_EMPTY = 0[source]

Database slot is empty (unused, not necessarily zero’ed, but uninitialized).

SLOT_DATA_INDEX = 5[source]

FIXME.

SLOT_DATA_MATERIALIZATION = 7[source]

FIXME.

SLOT_DATA_METADATA = 1[source]

FIXME.

SLOT_DATA_REPLICATION = 6[source]

FIXME.

SLOT_DATA_SEQUENCE = 3[source]

FIXME.

SLOT_DATA_TABLE = 4[source]

Database slot contains a persistent map, for example a map of type OID to Pickle.

SLOT_DATA_TYPE = 2[source]

FIXME.

_index_to_slot[source]
_name_to_slot[source]
slot(slot_index, marshal=None, unmarshal=None, build=None, cast=None, compress=False)[source]

Decorator for use on classes derived from zlmdb.PersistentMap. The decorator define slots in a LMDB database schema based on persistent maps, and slot configuration.

Parameters:
  • slot_index

  • marshal

  • unmarshal

  • build

  • cast

  • compress

Returns:

class Slot(slot, name, pmap)[source]

Bases: object

LMDB database slot. A slot is defined just by the convention of using the first 2 bytes of keys in a LMDB database as the “slot index”.

The 2 bytes are interpreted as an uint16 in big endian byte order.

name[source]
pmap[source]
slot[source]