Copernicus  2.0
 All Classes Namespaces Files Functions Variables
cpc.server.state.database.DBHandler Class Reference
Inheritance diagram for cpc.server.state.database.DBHandler:

Public Member Functions

def getCursor
 
def allocateDatabase
 

Public Attributes

 conf
 
 dbpath
 

Detailed Description

Provides access to the server database. Can be used from several threads.
example usage is
    handler = DBHandler()
    with handler.getCursor() as c:
        c.execute("query")
        c.execute("query")
This provides a transactional cursor which will rollback any changes if an
exception is throw at any time during the 'with' clause. The changes are
committed once the with-clause goes out of scope.
Note that transaction only cover DML statements and will implicitly commit
before any non-dml, such as a CREATE TABLE

Member Function Documentation

def cpc.server.state.database.DBHandler.allocateDatabase (   self)
def cpc.server.state.database.DBHandler.getCursor (   self)

Member Data Documentation

cpc.server.state.database.DBHandler.conf
cpc.server.state.database.DBHandler.dbpath

The documentation for this class was generated from the following file: