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

Class SerManager

source code

                     object --+    
                              |    
utils.codetricks.IdManagerMixin --+
                                  |
                                 SerManager

A wrapper for the serialisation of table data.

SerManager instances keep information on what values certain columns can assume and how to map them to concrete values in VOTables, HTML or ASCII.

They are constructed with a BaseTable instance.

You can additionally give:

Iterate over a SerManager to retrieve the annotated columns.

Instance Methods
 
__init__(self, table, withRanges=True, acquireSamples=True, idManager=None, mfRegistry=<gavo.utils.serializers.ValueMapperFactoryRegistry object>)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__iter__(self) source code
 
getColumnByName(self, name)
returns an AnnotatedColumn element for name.
source code
 
getMappedValues(self)
iterates over the table's rows as dicts with mapped values.
source code
 
getMappedTuples(self)
iterates over the table's rows as tuples with mapped values.
source code

Inherited from utils.codetricks.IdManagerMixin: cloneFrom, getForId, getIdFor, getOrMakeIdFor, makeIdFor

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

Properties

Inherited from object: __class__

Method Details

__init__(self, table, withRanges=True, acquireSamples=True, idManager=None, mfRegistry=<gavo.utils.serializers.ValueMapperFactoryRegistry object>)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

getColumnByName(self, name)

source code 

returns an AnnotatedColumn element for name.

To help out in case name has gone through postgres, this will try name lowercased if it doesn't match in normal case.

This will raise a KeyError if name can't be found anyway.