Aestate
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

 _queue
 

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 simple_pooled_pg.py.

Constructor & Destructor Documentation

◆ __init__()

def aestate.opera.DBPool.simple_pooled_pg.PooledPg.__init__ (   self,
  maxconnections,
args,
**  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 simple_pooled_pg.py.

Member Function Documentation

◆ cache()

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

Definition at line 131 of file simple_pooled_pg.py.

◆ connection()

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

Definition at line 135 of file simple_pooled_pg.py.

Member Data Documentation

◆ _queue

aestate.opera.DBPool.simple_pooled_pg.PooledPg._queue
private

Definition at line 125 of file simple_pooled_pg.py.

◆ version

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

Definition at line 109 of file simple_pooled_pg.py.


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