Public Member Functions | Static Public Attributes | Private Attributes | List of all members
aestate.opera.DBPool.simple_pooled_pg.PooledPg Class Reference
Collaboration diagram for aestate.opera.DBPool.simple_pooled_pg.PooledPg:
Collaboration graph

Public Member Functions

def __init__ (self, maxconnections, *args, **kwargs)
def cache (self, con)
def connection (self)

Static Public Attributes

 version = __version__

Private Attributes


Detailed Description

A very simple PostgreSQL connection pool.

After you have created the connection pool,
you can get connections using getConnection().

Definition at line 102 of file

Constructor & Destructor Documentation

◆ __init__()

def aestate.opera.DBPool.simple_pooled_pg.PooledPg.__init__ (   self,
**  kwargs 
Set up the PostgreSQL connection pool.

maxconnections: the number of connections cached in the pool
args, kwargs: the parameters that shall be used to establish
    the PostgreSQL connections using pg.connect()

Definition at line 111 of file

Member Function Documentation

◆ cache()

def aestate.opera.DBPool.simple_pooled_pg.PooledPg.cache (   self,
Add or return a connection to the pool.

Definition at line 131 of file

◆ connection()

def aestate.opera.DBPool.simple_pooled_pg.PooledPg.connection (   self)
Get a connection from the pool.

Definition at line 135 of file

Member Data Documentation

◆ _queue


Definition at line 125 of file

◆ version

aestate.opera.DBPool.simple_pooled_pg.PooledPg.version = __version__

Definition at line 109 of file

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