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

Class QueryFieldInfos

source code

object --+    
         |    
FieldInfos --+
             |
            QueryFieldInfos

FieldInfos inferred from a FROM clause.

To instanciate those, use the makeForNode class method below.

Instance Methods
 
getFieldInfoFromSources(self, colName, refName=None)
returns a field info for colName from anything in the from clause.
source code
 
getFieldInfo(self, colName, refName=None)
returns a field info for colName in self or any tables this query takes columns from.
source code

Inherited from FieldInfos: __init__, __repr__, addColumn, assertIsCompatible, locateTable

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

Class Methods
 
makeForNode(cls, queryNode, context)
cf.
source code
Class Variables
  enclosingQuery = None
hash(x)
Properties

Inherited from object: __class__

Method Details

makeForNode(cls, queryNode, context)
Class Method

source code 

cf. TableFieldInfos.makeForNode.

getFieldInfoFromSources(self, colName, refName=None)

source code 

returns a field info for colName from anything in the from clause.

That is, the columns in the select clause are ignored. Use this to resolve expressions from the queries' select clause.

See getFieldInfo for refName

getFieldInfo(self, colName, refName=None)

source code 

returns a field info for colName in self or any tables this query takes columns from.

To do that, it collects all fields of colName in self and subTables and returns the matching field if there's exactly one. Otherwise, it will raise ColumnNotFound or AmbiguousColumn.

If the node.TableName instance refName is given, the search will be restricted to the matching tables.

Overrides: FieldInfos.getFieldInfo