Package gavo :: Package base :: Module config :: Class DBProfile
[frames] | no frames]

Class DBProfile

source code

              object --+            
                       |            
 structure.StructureBase --+        
                           |        
              object --+   |        
                       |   |        
           common.Parser --+        
                           |        
structure.ParseableStructure --+    
                               |    
             structure.Structure --+
                                   |
                                  DBProfile

is a profile for DB access.

Nested Classes

Inherited from structure.StructureBase: __metaclass__

Instance Methods
 
getDsn(self) source code
 
getArgs(self)
returns a dictionary suitable as keyword arguments to psycopg2's connect.
source code

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

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

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

Inherited from common.Parser: feedEvent

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

Class Methods

Inherited from structure.StructureBase: fromStructure

Class Variables
  name_ = 'dbProfile'
a sentinel for all kinds of undefined values.
  profileName = 'anonymous'
  attrSeq = [<gavo.base.attrdef.UnicodeAttribute object>, <gavo....
  managedAttrs = {'database': <gavo.base.attrdef.UnicodeAttribut...

Inherited from structure.Structure: __implemented__

Inherited from structure.StructureBase: completedCallbacks

Properties
  roleName
returns the database role used by this profile.

Inherited from object: __class__

Class Variable Details

attrSeq

Value:
[<gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.IntAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>]

managedAttrs

Value:
{'database': <gavo.base.attrdef.UnicodeAttribute object>,
 'host': <gavo.base.attrdef.UnicodeAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'name': <gavo.base.attrdef.UnicodeAttribute object>,
 'password': <gavo.base.attrdef.UnicodeAttribute object>,
 'port': <gavo.base.attrdef.IntAttribute object>,
 'sslmode': <gavo.base.attrdef.UnicodeAttribute object>,
 'user': <gavo.base.attrdef.UnicodeAttribute object>}

Property Details

roleName

returns the database role used by this profile.

This normally is user, but in the special case of the empty user, we return the logged users' name.

Get Method:
unreachable.roleName(self) - returns the database role used by this profile.