Package gavo :: Package web :: Module formrender :: Class ToFormalConverter
[frames] | no frames]

Class ToFormalConverter

source code

                            object --+    
                                     |    
utils.typeconversions.FromSQLConverter --+
                                         |
                                        ToFormalConverter

is a converter from SQL types to Formal type specifications.

The result of the conversion is a tuple of formal type and widget factory.

Instance Methods
 
convert(self, type, xtype=None) 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__

Class Variables
  typeSystem = 'Formal'
  simpleMap = {'bigint': (<class 'gavo.imp.formal.types.Integer'...
Properties

Inherited from object: __class__

Method Details

convert(self, type, xtype=None)

source code 
Overrides: utils.typeconversions.FromSQLConverter.convert

mapComplex(self, type, length)

source code 
Overrides: utils.typeconversions.FromSQLConverter.mapComplex

Class Variable Details

simpleMap

Value:
{'bigint': (<class 'gavo.imp.formal.types.Integer'>,
            <class 'gavo.imp.formal.widget.TextInput'>),
 'boolean': (<class 'gavo.imp.formal.types.Boolean'>,
             <class 'gavo.imp.formal.widget.Checkbox'>),
 'char': (<class 'gavo.imp.formal.types.String'>,
          <class 'gavo.imp.formal.widget.TextInput'>),
 'date': (<class 'gavo.imp.formal.types.Date'>,
          <__builtin__.function object>),
...