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

Module valuemappers

source code

Serialising table rows.

The main class in this module is the SerManager, which knows about a target table and figures out how to turn the values in the table rows into strings.

This is used by formats.votablewrite and the HTML table serialisation.

utils.serializers has once been a part of this module. To save migration effort, for now it reproduces that module's interface.

Classes
  SerManager
A wrapper for the serialisation of table data.
  VOTNameMaker
A class for generating db-unique names from VOTable fields.
Functions
 
needsQuoting(identifier, forRowmaker=False)
returns True if identifier needs quoting in an SQL statement. >>> needsQuoting("RA(J2000)") True >>> needsQuoting("ABS") True >>> needsQuoting("r") False
source code
 
getNameBlacklist(*args)
returns a set of names not suitable for table column names.
source code
Variables
  __package__ = 'gavo.base'
Function Details

getNameBlacklist(*args)

source code 

returns a set of names not suitable for table column names.

This comprises SQL reserved words in lower case and, if forRowmaker is true, also some names damaging row makers (e.g. python reserved words).

Decorators:
  • @utils.memoized