• File: threadlocal.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyc
  • Date Modified: 08/05/2019 10:14 AM
  • File size: 6.67 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

4]c@shdZddlZddlmZddlmZdejfdYZd	ejfd
YZdS(s8Provides a thread-local transactional wrapper around the root Engine class.

The ``threadlocal`` module is invoked when using the
``strategy="threadlocal"`` flag with :func:`~sqlalchemy.engine.create_engine`.
This module is semi-private and is invoked automatically when the threadlocal
engine strategy is used.
iNi(tbasei(tutiltTLConnectioncBs,eZdZdZdZdZRS(cOs&tt|j||d|_dS(Ni(tsuperRt__init__t_TLConnection__opencount(tselftargtkw((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyRscCs|jd7_|S(Ni(R(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt_increment_connectscCs5|jdkr"tjj|n|jd8_dS(Ni(RRt
Connectiontclose(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyRscCsd|_tjj|dS(Ni(RRR
R(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt_force_close$s	(t__name__t
__module__RR	RR(((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyRs			tTLEnginecBseZdZeZejdddZdZdZ	ddZdZdZ
d	Zd
ZdZdZd
ZdZedZdZdZRS(sPAn Engine that includes support for thread-local managed
    transactions.

    s1.3sThe 'threadlocal' engine strategy is deprecated, and will be removed in a future release.  The strategy is no longer relevant to modern usage patterns (including that of the ORM :class:`.Session` object) which make use of a :class:`.Connection` object in order to invoke statements.cOs/tt|j||tjj|_dS(N(RRRRt	threadingtlocalt_connections(Rtargstkwargs((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR1s	cKs
|j|S(N(t_contextual_connect(RR((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pytcontextual_connect=scKst|jdsd}n|jj}|dks?|jr~|j||j|jj||}t	j
||j_n|jS(Ntconn(thasattrRtNoneRtclosedt_tl_connection_clst_wrap_pool_connecttpooltconnecttweakreftrefR	(RRt
connection((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR@s		cCsJt|jds!g|j_n|jjj|jjd||S(Nttranstxid(RRR"tappendRtbegin_twophase(RR#((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR%Rs
cCsDt|jds!g|j_n|jjj|jj|S(NR"(RRR"R$Rtbegin_nested(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR&Zs
cCsDt|jds!g|j_n|jjj|jj|S(NR"(RRR"R$Rtbegin(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR'bscCs|S(N((R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt	__enter__hscCs'|dkr|jn
|jdS(N(Rtcommittrollback(Rttype_tvaluet	traceback((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt__exit__ks
cCs<t|jds |jjr$dS|jjdjdS(NR"i(RRR"tprepare(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR/qs
cCsGt|jds |jjr$dS|jjjd}|jdS(NR"i(RRR"tpopR)(RR"((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR)ys

cCsGt|jds |jjr$dS|jjjd}|jdS(NR"i(RRR"R0R*(RR"((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR*s

cCs)tjj|_tt|jdS(N(RRRRRRtdispose(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR1scCs8t|jdp7|jjdkp7|jjjS(NR(RRRRR(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyRscCsN|jsJ|jj|jj}|j|j`g|j_ndS(N(RRRRRRR"(RR!((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyRs	
	cCsd|jS(NsTLEngine(%r)(turl(R((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt__repr__sN(R
Rt__doc__RRRt
deprecatedRRRRR%R&R'R(R.R/R)R*R1tpropertyRRR3(((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyR)s&
													(	R4RtRRR
RtEngineR(((sP/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/threadlocal.pyt<module>s