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

Module typesystems

source code

Conversions between type systems.

The DC software has to deal with a quite a few type systems:

Based on the (stinking) framework of utils.typeconversions, this module contains converters between them as necessary. The linuga franca of our type systems is SQL+extensions as laid down in utils.typeconversions.

Classes
  FromSQLConverter
is an abstract base class for type converters from the SQL type system.
  ConversionError
Functions
 
sqltypeToVOTable(sqlType) source code
 
voTableToSQLType(type, arraysize, xtype=None) source code
 
sqltypeToPG(type)
returns a postgres type for one of our internal SQL types.
source code
 
sqltypeToXSD(sqlType) source code
 
sqltypeToNumpy(sqlType) source code
 
sqltypeToPython(sqlType) source code
 
sqltypeToPythonCode(sqlType) source code
 
sqltypeToPgValidator(sqlType) source code
 
pythonToLiteral(type) source code
Function Details

sqltypeToPG(type)

source code 

returns a postgres type for one of our internal SQL types.

This is really only necessary because of our UNICODE hack. And it shouldn't become more complex than this.

>>> sqltypeToPG("INT[23, 42]")
'INT[23, 42]'
>>> sqltypeToPG("uniCode[23]")
'TEXT[23]'