Class AnnotationContext
source code
object --+
|
AnnotationContext
An context object for the annotation process.
It is constructed with a FieldInfoGetter implementation and an
equivalence policy for STC objects.
It has errors and warnings attributes consisting of user-exposable
error strings accrued during the annotation process.
The annotation context also manages the namespaces for column
reference resolution. It maintains a stack of getters; is is maintained
using the customResolver context manager.
withTables, if passed, must be a sequence of already annotated
WithQuery objects.
Finally, the annotation context provides a ancestors attribute that,
at any time, gives a list of the current node's ancestor nodes.
|
__init__(self,
retrieveFieldInfos,
equivalencePolicy=<gavo.stc.eq.EquivalencePolicy object>)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
getFieldInfo(self,
colName,
tableName)
returns the (colName, fieldInfo) for colName within tableName in the
current context. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
Inherited from object :
__class__
|
__init__(self,
retrieveFieldInfos,
equivalencePolicy=<gavo.stc.eq.EquivalencePolicy object>)
(Constructor)
| source code
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Overrides:
object.__init__
- (inherited documentation)
|
a context manager temporarily installing a different field info
getter.
- Decorators:
@contextlib.contextmanager
|
adds a nodes.WithQuery to use in column resolution.
withTable must already be annotated for this to work.
|