%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyo

�
��4]c@szdZddlmZddlmZddlmZiZejdd�d��Zd	�Z	d
e
fd��YZdS(
s�DBAPI proxy utility.

Provides transparent connection pooling on top of a Python DBAPI.

This is legacy SQLAlchemy functionality that is not typically used
today.

i(t	QueuePooli(tutil(t	threadings1.3sYThe :func:`.pool.manage` function is deprecated, and will be removed in a future release.cKs:yt|SWn'tk
r5tj|t||��SXdS(sHReturn a proxy for a DB-API module that automatically
    pools connections.

    Given a DB-API 2.0 module and pool management parameters, returns
    a proxy for the module that will automatically pool connections,
    creating new connection pools for each distinct set of connection
    arguments sent to the decorated module's connect() function.

    :param module: a DB-API 2.0 database module

    :param poolclass: the class used by the pool module to provide
      pooling.  Defaults to :class:`.QueuePool`.

    :param \**params: will be passed through to *poolclass*

    N(tproxiestKeyErrort
setdefaultt_DBProxy(tmoduletparams((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pytmanages
cCs/xtj�D]}|j�q
Wtj�dS(sYRemove all current DB-API 2.0 managers.

    All pools and connections are disposed.
    N(Rtvaluestclosetclear(tmanager((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pytclear_managers5sRcBsYeZdZed�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	s	Layers connection pooling behavior on top of a standard DB-API module.

    Proxies a DB-API 2.0 connect() call to a connection pool keyed to the
    specific connect parameters. Other functions and attributes are delegated
    to the underlying DB-API module.
    cKs7||_||_||_i|_tj�|_dS(s�Initializes a new proxy.

        module
          a DB-API 2.0 module

        poolclass
          a Pool class, defaulting to QueuePool

        Other parameters are sent to the Pool object's constructor.

        N(Rtkwt	poolclasstpoolsRtLockt_create_pool_mutex(tselfRRR((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyt__init__Is

				cCs(x!t|j�D]}|j|=qWdS(N(tlistR(Rtkey((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyR\scCs|j�dS(N(R(R((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyt__del__`scCst|j|�S(N(tgetattrR(RR((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyt__getattr__cscs��j���}y�j|SWn�tk
r��jj�zc|�jkr��jdd��j���fd��j�}|�j|<|S�j|SWd�jj	�XnXdS(Ntsa_pool_keycs�jj���S(N(Rtconnect((targsRR(sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyt<lambda>pt(
t
_serializeRRRtacquiretpoptNoneRRtrelease(RRRRtpool((RRRsN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pytget_poolfs


cOs|j||�j�S(s,Activate a connection to the database.

        Connect to the database using this DBProxy's module and the given
        connect arguments.  If the arguments match an existing pool, the
        connection will be returned from the pool's current thread-local
        connection instance, or if there is no thread-local connection
        instance it will be checked out from the set of pooled connections.

        If the pool has no available connections and allows new connections
        to be created, a new database connection will be made.

        (R&R(RRR((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyRyscOs8|j||�}y|j|=Wntk
r3nXdS(s;Dispose the pool referenced by the given connect arguments.N(R RR(RRRR((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pytdispose�s

cOsKd|kr|dStt|�gt|�D]}|||f^q-�S(NR(ttupleRtsorted(RRRtk((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyR �s(t__name__t
__module__t__doc__RRRRRR&RR'R (((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyR@s							N(R-timplRRRRRt
deprecatedR	RtobjectR(((sN/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/pool/dbapi_proxy.pyt<module>s	

Zerion Mini Shell 1.0