File: //opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/pool/events.pyc
�
���ec @ sM d d l m Z d d l m Z d d l m Z d e j f d � � YZ d S( i ( t Pooli ( t event( t Enginet
PoolEventsc B s� e Z d Z d Z e Z e d � � Z e d � � Z d � Z d � Z
d � Z d � Z d � Z
d � Z d
� Z d � Z d � Z d
� Z RS( s� Available events for :class:`_pool.Pool`.
The methods here define the name of an event as well
as the names of members that are passed to listener
functions.
e.g.::
from sqlalchemy import event
def my_on_checkout(dbapi_conn, connection_rec, connection_proxy):
"handle an on checkout event"
event.listen(Pool, 'checkout', my_on_checkout)
In addition to accepting the :class:`_pool.Pool` class and
:class:`_pool.Pool` instances, :class:`_events.PoolEvents` also accepts
:class:`_engine.Engine` objects and the :class:`_engine.Engine` class as
targets, which will be resolved to the ``.pool`` attribute of the
given engine or the :class:`_pool.Pool` class::
engine = create_engine("postgresql://scott:tiger@localhost/test")
# will associate with engine.pool
event.listen(engine, 'checkout', my_on_checkout)
t SomeEngineOrPoolc C s� t | t � r8 t | t � r"