Package gavo :: Package adql :: Module nodes :: Class JoinedTable
[frames] | no frames]

Class JoinedTable

source code

             object --+            
                      |            
utils.autonode.AutoNode --+        
                          |        
                   ADQLNode --+    
                              |    
              ColumnBearingNode --+
                                  |
                                 JoinedTable

A joined table.

These aren't made directly by the parser since parsing a join into a binary structure is very hard using pyparsing. Instead, there's the helper function makeJoinedTableTree handling the joinedTable symbol that manually creates a binary tree.

Nested Classes

Inherited from utils.autonode.AutoNode: __metaclass__

Instance Methods
 
flatten(self)
returns a string representation of the text content of the tree.
source code
 
addFieldInfos(self, context) source code
 
getAllNames(self)
iterates over all fully qualified table names mentioned in this (possibly joined) table reference.
source code
 
getTableForName(self, name) source code
 
makeUpId(self) source code
 
getJoinType(self)
returns a keyword indicating how result rows are formed in this join.
source code
 
getAllTables(self)
returns all actual tables and subqueries (not sub-joins) within this join.
source code
 
__init__(self, joinSpecification=None, leftOperand=None, operator=None, rightOperand=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from ColumnBearingNode: change, getFieldInfo

Inherited from ADQLNode: __repr__, asTree, getFlattenedChildren, iterTree

Inherited from utils.autonode.AutoNode: iterAttributes, iterChildren, iterNodeChildren, iterNodes

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

Class Methods

Inherited from ADQLNode: fromParseResult

Inherited from utils.autonode.AutoNode: cloneFrom

Class Variables
  type = None
hash(x)
  originalTable = None
hash(x)
  tableName = <ADQL Node tableName>
  qName = None
hash(x)

Inherited from ColumnBearingNode: fieldInfos

Properties

Inherited from object: __class__

Method Details

flatten(self)

source code 

returns a string representation of the text content of the tree.

This default implementation will only work if you returned all parsed elements as children. This, in turn, is something you only want to do if you are sure that the node is question will not be morphed.

Otherwise, override it to create an SQL fragment out of the parsed attributes.

Overrides: ADQLNode.flatten
(inherited documentation)

getAllNames(self)

source code 

iterates over all fully qualified table names mentioned in this (possibly joined) table reference.

Overrides: ColumnBearingNode.getAllNames

getJoinType(self)

source code 

returns a keyword indicating how result rows are formed in this join.

This can be NATURAL (all common columns are folded into one), USING (check the joinSpecification what columns are folded), CROSS (no columns are folded).

__init__(self, joinSpecification=None, leftOperand=None, operator=None, rightOperand=None)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)