Package gavo :: Package adql :: Module fieldinfos :: Class FieldInfos
[frames] | no frames]

Class FieldInfos

source code

object --+
         |
        FieldInfos
Known Subclasses:

A base class for field annotations.

Subclasses of those are attached to physical tables, joins, and subqueries.

The information on columns is kept in two places:

A FieldInfos object is instanciated with the object it will annotate, and the annotation (i.e., setting of the fieldInfos attribute on the parent) will happen during instanciation.

Instance Methods
 
__init__(self, parent, context)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
source code
 
locateTable(self, refName)
returns a table instance matching the node.TableName refName.
source code
 
addColumn(self, label, info)
adds a new visible column to this info.
source code
 
getFieldInfo(self, colName, refName=None)
returns a FieldInfo object for colName.
source code
 
assertIsCompatible(self, other)
raises an IncompatibleTables if the FieldInfos other have different length or names from self.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, parent, context)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

locateTable(self, refName)

source code 

returns a table instance matching the node.TableName refName.

If no such table is in scope, the function raises a TableNotFound.

addColumn(self, label, info)

source code 

adds a new visible column to this info.

This entails both entering it in self.columns and in self.seq.

getFieldInfo(self, colName, refName=None)

source code 

returns a FieldInfo object for colName.

Unknown columns result in a ColumnNotFound exception.

refName is ignored here; we may check that it's identical with parent's name later.