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

Class FieldInfoedNode

source code

             object --+        
                      |        
utils.autonode.AutoNode --+    
                          |    
                   ADQLNode --+
                              |
                             FieldInfoedNode
Known Subclasses:

An ADQL node that carries a FieldInfo.

This is true for basically everything in the tree below a derived column. This class is the basis for column annotation.

You'll usually have to override addFieldInfo. The default implementation just looks in its immediate children for anything having a fieldInfo, and if there's exactly one such child, it adopts that fieldInfo as its own, not changing anything.

FieldInfoedNode, when change()d, keep their field info. This is usually what you want when morphing, but sometimes you might need adjustments.

Nested Classes

Inherited from utils.autonode.AutoNode: __metaclass__

Instance Methods
 
addFieldInfo(self, context) source code
 
change(self, **kwargs)
returns a shallow copy of self with constructor arguments in kwargs changed.
source code
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from ADQLNode: __repr__, asTree, flatten, 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
  fieldInfo = None
hash(x)

Inherited from ADQLNode: type

Properties

Inherited from object: __class__

Method Details

change(self, **kwargs)

source code 

returns a shallow copy of self with constructor arguments in kwargs changed.

Overrides: utils.autonode.AutoNode.change
(inherited documentation)

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)