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

Class DBCore

source code

                   object --+                    
                            |                    
 base.structure.StructureBase --+                
                                |                
                   object --+   |                
                            |   |                
           base.common.Parser --+                
                                |                
base.structure.ParseableStructure --+            
                                    |            
             base.structure.Structure --+        
                                        |        
                                core.Core --+    
                                            |    
                               TableBasedCore --+
                                                |
                                               DBCore
Known Subclasses:

A core performing database queries on one table or view.

DBCores ask the service for the desired output schema and adapt their output. The DBCore's output table, on the other hand, lists all fields available from the queried table.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
wantsTableWidget(self) source code
 
getQueryCols(self, service, queryMeta)
returns the fields we need in the output table.
source code
 
run(self, service, inputTable, queryMeta)
does the DB query and returns an InMemoryTable containing the result.
source code
 
clearProperty(self, name) source code
 
getFullId(self) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
resolveName(instance, context, id) source code
 
setProperty(self, name, value) source code

Inherited from TableBasedCore: adaptForRenderer, completeElement

Inherited from core.Core: __init__, __repr__, __str__, initialize, makeUserDoc

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__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'dbCore'
a sentinel for all kinds of undefined values.
  attrSeq = [<gavo.base.complexattrs.StructListAttribute object>...
  managedAttrs = {'condDesc': <gavo.base.complexattrs.StructList...

Inherited from core.Core: inputTableXML, outputTableXML

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  rd

Inherited from object: __class__

Method Details

getQueryCols(self, service, queryMeta)

source code 

returns the fields we need in the output table.

The normal DbBased core just returns whatever the service wants. Derived cores, e.g., for special protocols, could override this to make sure they have some fields in the result they depend on.

run(self, service, inputTable, queryMeta)

source code 

does the DB query and returns an InMemoryTable containing the result.

Overrides: core.Core.run

clearProperty(self, name)

source code 
Overrides: core.Core.clearProperty

getFullId(self)

source code 
Overrides: core.Core.getFullId

getProperty(self, name, default=<Undefined>)

source code 
Overrides: core.Core.getProperty

hasProperty(self, name)

source code 
Overrides: core.Core.hasProperty

resolveName(instance, context, id)

source code 
Overrides: TableBasedCore.resolveName

setProperty(self, name, value)

source code 
Overrides: core.Core.setProperty

Class Variable Details

attrSeq

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

managedAttrs

Value:
{'condDesc': <gavo.base.complexattrs.StructListAttribute object>,
 'condDescs': <gavo.base.complexattrs.StructListAttribute object>,
 'distinct': <gavo.base.attrdef.BooleanAttribute object>,
 'groupBy': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'inputTable': <gavo.base.complexattrs.StructAttribute object>,
 'limit': <gavo.base.attrdef.IntAttribute object>,
 'namePath': <gavo.rscdef.common.NamePathAttribute object>,
...

Property Details

rd

Get Method:
unreachable._getRD(self)