Package twisted :: Package world :: Module typemap :: Class ITypeMapper
[show private | hide private]
[frames | no frames]

Class ITypeMapper

NonMetaInterface --+
                   |
                  ITypeMapper


I map between high-level (possibly variable length) python types and low-level (guaranteed fixed length) attributes and allow objects to be stored in a fixed-length record store.
Method Summary
  getLowColumns(self, name)
Get a list of primitive columns that will store all necessary data for an object of the type I proxy for.
  getPhysicalSize(self)
Return an integer - the size of one column of this datatype.
  highToLow(self, db, obj)
Convert a high-level object to a tuple of low-level objects, to be stored in
  lowToHigh(self, db, tup)
Convert a `primitive' tuple to a high-level object with behavior.
  null(self)
Return a 'null' object that will fit into this column, such as None, 0, '', etc.
  toTuple(self)
Convert this typemapper to a tuple which both globally identifies it and provides a simple serialization for it.

Method Details

getLowColumns(self, name)

Get a list of primitive columns that will store all necessary data for an object of the type I proxy for. This is a tuple of (type, name) columns. Low level types are: int, float, long, bool.

getPhysicalSize(self)

Return an integer - the size of one column of this datatype.

highToLow(self, db, obj)

Convert a high-level object to a tuple of low-level objects, to be stored in

lowToHigh(self, db, tup)

Convert a `primitive' tuple to a high-level object with behavior.

null(self)

Return a 'null' object that will fit into this column, such as None, 0, '', etc.

toTuple(self)

Convert this typemapper to a tuple which both globally identifies it and provides a simple serialization for it.

Generated by Epydoc 1.1 on Fri Jun 27 03:49:21 2003 http://epydoc.sf.net