Classes | Functions | Variables
aestate.opera.DBPool.steady_db Namespace Reference


class  InvalidCursor
class  SteadyDBConnection
class  SteadyDBCursor
class  SteadyDBError


def connect (creator, maxusage=None, setsession=None, failures=None, ping=1, closeable=True, *args, **kwargs)


 baseint = int

Function Documentation

◆ connect()

def aestate.opera.DBPool.steady_db.connect (   creator,
  maxusage = None,
  setsession = None,
  failures = None,
  ping = 1,
  closeable = True,
**  kwargs 
A tough version of the connection constructor of a DB-API 2 module.

creator: either an arbitrary function returning new DB-API 2 compliant
    connection objects or a DB-API 2 compliant database module
maxusage: maximum usage limit for the underlying DB-API 2 connection
    (number of database operations, 0 or None means unlimited usage)
    callproc(), execute() and executemany() count as one operation.
    When the limit is reached, the connection is automatically reset.
setsession: an optional list of SQL commands that may serve to prepare
    the session, e.g. ["set datestyle to german", "set time zone mez"]
failures: an optional exception class or a tuple of exception classes
    for which the failover mechanism shall be applied, if the default
    (OperationalError, InternalError) is not adequate
ping: determines when the connection should be checked with ping()
    (0 = None = never, 1 = default = when _ping_check() is called,
    2 = whenever a cursor is created, 4 = when a query is executed,
    7 = always, and all other bit combinations of these values)
closeable: if this is set to false, then closing the connection will
    be silently ignored, but by default the connection can be closed
args, kwargs: the parameters that shall be passed to the creator
    function or the connection constructor of the DB-API 2 module

Definition at line 16 of file

Here is the caller graph for this function:

Variable Documentation

◆ baseint

aestate.opera.DBPool.steady_db.baseint = int

Definition at line 5 of file