Package gavo :: Package rscdef :: Module column :: Class ColumnBase
[frames] | no frames]

Class ColumnBase

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                           object --+   |
                                    |   |
                  base.meta.MetaMixin --+
                                        |
                                       ColumnBase
Known Subclasses:

A base class for columns, parameters, output fields, etc.

Actually, right now there's far too much cruft in here that should go into Column proper or still somewhere else. Hence: XXX TODO: Refactor.

See also Column for a docstring that still applies to all we've in here.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__, name_

Instance Methods
 
__repr__(self)
repr(x)
source code
 
setMetaParent(self, parent) source code
 
onParentComplete(self) source code
 
completeElement(self, ctx) source code
 
isEnumerated(self) source code
 
validate(self) source code
 
validateValue(self, value)
raises a ValidationError if value does not match the constraints given here.
source code
 
isIndexed(self)
returns a guess as to whether this column is part of an index.
source code
 
isPrimary(self)
returns a guess as to whether this column is a primary key of the embedding table.
source code
 
asInfoDict(self)
returns a dictionary of certain, "user-interesting" properties of the data field, in a dict of strings.
source code
 
getDDL(self)
returns an SQL fragment describing this column ready for inclusion in a DDL statement.
source code
 
getDisplayHintAsString(self) source code
 
getLabel(self)
returns a short label for this column.
source code
 
clearProperty(self, name) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
setProperty(self, name, value) source code

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

Inherited from base.structure.ParseableStructure: __init__, 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 base.meta.MetaMixin: addMeta, buildRepr, copyMetaFrom, delMeta, getAllMetaPairs, getMeta, getMetaKeys, getMetaParent, isEmpty, iterMeta, keys, makeOriginal, setMeta, traverse

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

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  restrictedMode = False
  attrSeq = [<gavo.base.meta.MetaAttribute object>, <gavo.rscdef...
  managedAttrs = {'description': <gavo.base.attrdef.NWUnicodeAtt...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Method Details

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

setMetaParent(self, parent)

source code 
Overrides: base.meta.MetaMixin.setMetaParent

completeElement(self, ctx)

source code 
Overrides: base.structure.Structure.completeElement

validate(self)

source code 
Overrides: base.structure.Structure.validate

isIndexed(self)

source code 

returns a guess as to whether this column is part of an index.

This may return True, False, or None (unknown).

isPrimary(self)

source code 

returns a guess as to whether this column is a primary key of the embedding table.

This may return True, False, or None (unknown).

getLabel(self)

source code 

returns a short label for this column.

The label is either the tablehead or, missing it, the capitalized column name.


Class Variable Details

attrSeq

Value:
[<gavo.base.meta.MetaAttribute object>,
 <gavo.rscdef.column.ParamNameAttribute object>,
 <gavo.rscdef.column.TypeNameAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.NWUnicodeAttribute object>,
 <gavo.rscdef.column.TableManagedAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
...

managedAttrs

Value:
{'description': <gavo.base.attrdef.NWUnicodeAttribute object>,
 'displayHint': <gavo.rscdef.column.DisplayHintAttribute object>,
 'dmRoles': <gavo.rscdef.column.DMRolesAttribute object>,
 'fixup': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'meta': <gavo.base.meta.MetaAttribute object>,
 'meta_': <gavo.base.meta.MetaAttribute object>,
 'name': <gavo.rscdef.column.ParamNameAttribute object>,
...