Package gavo :: Package base :: Module typesystems :: Class FromSQLConverter
[frames] | no frames]

Class FromSQLConverter

source code

object --+
         |
        FromSQLConverter
Known Subclasses:

is an abstract base class for type converters from the SQL type system.

Implementing classes have to provide a dict simpleMap mapping sql type strings to target types, and a method mapComplex that receives a type and a length (both strings, derived from SQL array types) and either returns None (no matching type) or the target type.

Implementing classes should also provide a typeSystem attribute giving a short name of the type system they convert to.

Instance Methods
 
convert(self, sqlType) source code
 
mapComplex(self, type, length) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__