Package gavo :: Package base :: Module sqlsupport :: Class UnmanagedQuerier
[frames] | no frames]

Class UnmanagedQuerier

source code

        object --+        
                 |        
PostgresQueryMixin --+    
                     |    
        object --+   |    
                 |   |    
StandardQueryMixin --+    
                     |    
          QuerierMixin --+
                         |
                        UnmanagedQuerier

A simple interface to querying the database through a connection
managed by someone else.

This is typically used as in::

        with base.getTableConn() as conn:
                q = UnmanagedQuerier(conn)
                ...

This contains numerous methods abstracting DB functionality a bit.
Documented ones include:

* schemaExissts(schema)
* getColumnsFromDB(tableName)
* getTableType(tableName) -- this will return None for non-existing tables,
  which is DaCHS' official way to determine table existence.
* getTimeout() -- returns the current query timeout in seconds
* setTimeout(timeout) -- sets a timeout in seconds.

Instance Methods
 
__init__(self, connection)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from QuerierMixin: abort, configureConnection, enableAutocommit, finish, query, queryDicts, queryToDicts

Inherited from PostgresQueryMixin: dropTable, foreignKeyExists, getACLFromRes, getColumnsFromDB, getForeignKeyName, getOIDForTable, getPrimaryIndexName, getRowEstimate, getSchemaPrivileges, getServerVersion, getTablePrivileges, getTableType, hasIndex, parsePGACL, roleExists, schemaExists

Inherited from StandardQueryMixin: getTimeout, setSchemaPrivileges, setTablePrivileges, setTimeout

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

Class Variables

Inherited from QuerierMixin: defaultProfile

Properties

Inherited from object: __class__

Method Details

__init__(self, connection)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)