Package gavo :: Package svcs :: Module standardcores :: Class CondDesc
[frames] | no frames]

Class CondDesc

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                                       CondDesc

A query specification for cores talking to the database.

CondDescs define inputs as a sequence of InputKeys (see `Element InputKey`_). Internally, the values in the InputKeys can be translated to SQL.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
__init__(self, parent, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
source code
 
completeElement(self, ctx) source code
 
expand(self, *args, **kwargs)
hands macro expansion requests (from phraseMakers) upwards.
source code
 
inputReceived(self, inPars, queryMeta)
returns True if all inputKeys can be filled from inPars.
source code
 
asSQL(self, inPars, sqlPars, queryMeta) source code
 
adaptForRenderer(self, renderer)
returns a changed version of self if renderer suggests such a change.
source code

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

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

Class Methods
 
fromInputKey(cls, ik, **kwargs) source code
 
fromColumn(cls, col, **kwargs) source code

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'condDesc'
a sentinel for all kinds of undefined values.
  attrSeq = [<gavo.base.parsecontext.ReferenceAttribute object>,...
  managedAttrs = {'buildFrom': <gavo.base.parsecontext.Reference...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  name
returns some key for uniqueness of condDescs.
  makePhrase

Inherited from object: __class__

Method Details

__init__(self, parent, **kwargs)
(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)

completeElement(self, ctx)

source code 
Overrides: base.structure.Structure.completeElement

expand(self, *args, **kwargs)

source code 

hands macro expansion requests (from phraseMakers) upwards.

This is to the queried table if the parent has one (i.e., we're part of a core), or to the RD if not (i.e., we're defined within an rd).

inputReceived(self, inPars, queryMeta)

source code 

returns True if all inputKeys can be filled from inPars.

As a side effect, inPars will receive defaults form the input keys if there are any.

adaptForRenderer(self, renderer)

source code 

returns a changed version of self if renderer suggests such a change.

This only happens if buildFrom is non-None. The method must return a "defused" version that has buildFrom None (or self, which will do because core.adaptForRenderer stops adapting if the condDescs are stable).

The adaptors may also raise a Replace exception and return a full CondDesc; this is done, e.g., for spoints for the form renderer, since they need two input keys and a completely modified phrase.


Class Variable Details

attrSeq

Value:
[<gavo.base.parsecontext.ReferenceAttribute object>,
 <gavo.base.attrdef.BooleanAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.complexattrs.StructAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.rscdef.common.ColumnListAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.parsecontext.OriginalAttribute object>,
...

managedAttrs

Value:
{'buildFrom': <gavo.base.parsecontext.ReferenceAttribute object>,
 'combining': <gavo.base.attrdef.BooleanAttribute object>,
 'fixedSQL': <gavo.base.attrdef.UnicodeAttribute object>,
 'group': <gavo.base.complexattrs.StructAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'inputKey': <gavo.rscdef.common.ColumnListAttribute object>,
 'inputKeys': <gavo.rscdef.common.ColumnListAttribute object>,
 'joiner': <gavo.base.attrdef.UnicodeAttribute object>,
...

Property Details

name

returns some key for uniqueness of condDescs.

Get Method:
unreachable.name(self) - returns some key for uniqueness of condDescs.

makePhrase

Get Method:
_getPhraseMaker(self)