$71 GRAYBYTE WORDPRESS FILE MANAGER $15

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 93.127.173.93 | ADMIN IP 216.73.216.215
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/python2.7/site-packages/pymysql/

HOME
Current File : /lib/python2.7/site-packages/pymysql//cursors.pyo
�
�-:Zc@@sddlmZmZddlmZddlZddlZddlmZm	Z	m
Z
ddlmZej
ddd	ejejB�Zd
efd��YZdefd
��YZdeefd��YZdefd��YZdeefd��YZdS(i(tprint_functiontabsolute_import(tpartialNi(t
range_typet	text_typetPY2(terrs'\s*((?:INSERT|REPLACE)\b.+\bVALUES?\s*)s6(\(\s*(?:%s|%\(.+\)s)\s*(?:,\s*(?:%s|%\(.+\)s)\s*)*\))s(\s*(?:ON DUPLICATE.*)?);?\s*\ZtCursorcB@sseZdZdZeZd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zed�Zd�Zdd
�Zd�Zdd�Zdd�Zd�Zd�Zdd�Zd�Zdd�Zd�Zdd�Zd�Zd�Zd�Zd�Z e!j"Z"e!j#Z#e!j$Z$e!j%Z%e!j&Z&e!j'Z'e!j(Z(e!j)Z)e!j*Z*e!j+Z+RS(s�
    This is the object you use to interact with the database.

    Do not create an instance of a Cursor yourself. Call
    connections.Connection.cursor().
    i�cC@sU||_d|_d|_d|_d|_d|_d|_d|_t	|_
dS(Nii����i(t
connectiontNonetdescriptiont	rownumbertrowcountt	arraysizet	_executedt_resultt_rowstFalset_warnings_handled(tselfR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt__init__%s								cC@sA|j}|dkrdSzx|j�r.qWWdd|_XdS(sD
        Closing a cursor just exhausts all remaining data.
        N(RR	tnextset(Rtconn((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytclose0s	cC@s|S(N((R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt	__enter__=scG@s~|j�dS(N(R(Rtexc_info((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt__exit__@scC@s"|jstjd��n|jS(Ns
Cursor closed(RRtProgrammingError(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt_get_dbDs	cC@s|jstjd��ndS(Nsexecute() first(RRR(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt_check_executedIs	cC@s|S(N((Rtrow((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt	_conv_rowMscG@sdS(s!Does nothing, required by DB API.N((Rtargs((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt
setinputsizesPtcG@sdS(s!Does nothing, required by DB API.N((RR ((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytsetoutputsizesSR"cC@sr|j�}|j}|r(|j�n|dksC||jk	rGdS|jsTdS|jd|�|j�tS(sGet the next query sett
unbufferedN(RRt_show_warningsR	thas_nexttnext_resultt_do_get_resulttTrue(RR$Rtcurrent_result((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt_nextsetVs	
	
cC@s
|jt�S(N(R+R(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyResc@sbt|t�r!|j��}n=t|ttf�r^t|���fd�|D��}n|S(Nc3@s$|]}�j|d��VqdS(tencodingN(t
_ensure_bytes(t.0tv(R,R(s3/usr/lib/python2.7/site-packages/pymysql/cursors.pys	<genexpr>ls(t
isinstanceRtencodettupletlistttype(RtxR,((R,Rs3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR-hs
(c@s�t|jd�j��t|ttf�retrKtt�|��}nt�fd�|D��St|t�r�tr�t�fd�|j	�D��}nt�fd�|j	�D��Str��|�}n�j
|�SdS(NR,c3@s|]}�j|�VqdS(N(tliteral(R.targ(R(s3/usr/lib/python2.7/site-packages/pymysql/cursors.pys	<genexpr>usc3@s-|]#\}}�|��|�fVqdS(N((R.tkeytval(tensure_bytes(s3/usr/lib/python2.7/site-packages/pymysql/cursors.pys	<genexpr>xsc3@s*|] \}}|�j|�fVqdS(N(R6(R.R8R9(R(s3/usr/lib/python2.7/site-packages/pymysql/cursors.pys	<genexpr>zs(RR-R,R0R2R3Rtmaptdicttitemstescape(RR R((RR:s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt_escape_argsos cC@sV|j�}tr-|j|d|j�}n|dk	rR||j||�}n|S(s�
        Returns the exact string that is sent to the database by calling the
        execute() method.

        This method follows the extension to the DB API 2.0 followed by Psycopg.
        R,N(RRR-R,R	R?(RtqueryR R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytmogrify�scC@sAx|j�rqW|j||�}|j|�}||_|S(s�Execute a query

        :param str query: Query to execute.

        :param args: parameters used with query. (optional)
        :type args: tuple, list or dict

        :return: Number of affected rows
        :rtype: int

        If args is a list or tuple, %s can be used as a placeholder in the query.
        If args is a dict, %(name)s can be used as a placeholder in the query.
        (RRAt_queryR(RR@R tresult((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytexecute�s	c@s�|s
dStj��}|r�|jd�d}|jd�j�}|jd�pYd}�j||||�j�j�j�St��fd�|D���_	�j	S(s�Run several data against one query

        :param query: query to execute on server
        :param args:  Sequence of sequences or mappings.  It is used as parameter.
        :return: Number of rows affected, if any.

        This method improves performance on multiple-row INSERT and
        REPLACE. Otherwise it is equivalent to looping over args with
        execute().
        NiiiR"c3@s!|]}�j�|�VqdS(N(RD(R.R7(R@R(s3/usr/lib/python2.7/site-packages/pymysql/cursors.pys	<genexpr>�s((
tRE_INSERT_VALUEStmatchtgrouptrstript_do_execute_manytmax_stmt_lengthRR,tsumR(RR@R tmtq_prefixtq_valuest	q_postfix((R@Rs3/usr/lib/python2.7/site-packages/pymysql/cursors.pytexecutemany�s"c
C@s�|j�}|j}t|t�r6|j|�}ntr]t|t�r]|j|�}nt|t�r~|j|�}nt|�}	t|�}||t|�|�}
t|
t�r�tr�|
j|�}
q�|
j|d�}
n|	|
7}	d}x�|D]�}||||�}
t|
t�rWtrB|
j|�}
qW|
j|d�}
nt	|	�t	|
�t	|�d|kr�||j
|	|�7}t|�}	n
|	d7}	|	|
7}	qW||j
|	|�7}||_|S(Ntsurrogateescapeiit,(RR?R0RR1Rt	bytearraytitertnexttlenRDR(
RtprefixtvaluestpostfixR RJR,RR>tsqlR/trowsR7((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRI�s>	

*
	cC@s�|j�}xMt|�D]?\}}d|||j|�f}|j|�|j�qWd|djgtt|��D]}d||f^q{�f}|j|�||_|S(sExecute stored procedure procname with args

        procname -- string, name of procedure to execute on server

        args -- Sequence of parameters to use with procedure

        Returns the original args.

        Compatibility warning: PEP-249 specifies that any modified
        parameters must be returned. This is currently impossible
        as they are only available by storing them in a server
        variable and then retrieved by a query. Since stored
        procedures return zero or more result sets, there is no
        reliable way to get at OUT or INOUT parameters via callproc.
        The server variables are named @_procname_n, where procname
        is the parameter above and n is the position of the parameter
        (from zero). Once all result sets generated by the procedure
        have been fetched, you can issue a SELECT @_procname_0, ...
        query using .execute() to get any OUT or INOUT values.

        Compatibility warning: The act of calling a stored procedure
        itself creates an empty result set. This appears after any
        result sets generated by the procedure. This is non-standard
        behavior with respect to the DB-API. Be sure to use nextset()
        to advance through all result sets; otherwise you may get
        disconnected.
        sSET @_%s_%d=%ssCALL %s(%s)RRs@_%s_%d(	Rt	enumerateR>RBRtjoinRRVR(RtprocnameR RtindexR7tqti((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytcallproc�s
	3
	cC@sX|j�|jdks1|jt|j�kr5dS|j|j}|jd7_|S(sFetch the next rowiN(RRR	RRV(RRC((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytfetchones
'cC@se|j�|jdkrdS|j|p/|j}|j|j|!}t|t|j��|_|S(sFetch several rowsN((RRR	RR
tminRV(RtsizetendRC((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt	fetchmanys
cC@sX|j�|jdkrdS|jr9|j|j}n	|j}t|j�|_|S(sFetch all the rowsN((RRR	RRV(RRC((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytfetchall%s
		trelativecC@s�|j�|dkr&|j|}n(|dkr;|}ntjd|��d|kont|j�kns�td��n||_dS(NRitabsolutesunknown scroll mode %sisout of range(RRRRRVRt
IndexError(Rtvaluetmodetr((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pytscroll1s
	%cC@s3|j�}||_|j|�|j�|jS(N(Rt_last_executedR@R(R(RR`R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRB>s
	

cC@sx|j�}d|_|j|_}|j|_|j|_|j|_|j|_	t
|_|jst|j
�ndS(Ni(RRRt
affected_rowsRR
t	insert_idt	lastrowidR[RRRt_defer_warningsR%(RRRC((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR(Es			cC@s�|jr
dSt|_|jr<|jjs8|jjr<dS|j�j�}|dkr^dSxh|D]`}|d}tr�t	|t
�r�|jdd�}q�ntj
tj|dd!�dd�qeWdS(Ni����sutf-8treplaceiit
stackleveli(RR)RR&t
warning_countRt
show_warningsR	RR0tunicodeR1twarningstwarnRtWarning(Rtwstwtmsg((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR%Ts		"

cC@st|jd�S(N(RTRcR	(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt__iter__dsN((,t__name__t
__module__t__doc__RJRRtRRRRRRRR!R#R+RR	R-R?RARDRPRIRbRcRgRhRoRBR(R%R�RR|tErrortInterfaceErrort
DatabaseErrort	DataErrortOperationalErrortIntegrityErrort
InternalErrorRtNotSupportedError(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRsN		
											$)		
	
													tDictCursorMixincB@s eZeZd�Zd�ZRS(cC@s�tt|�j�g}|jr{xJ|jjD]<}|j}||kr^|jd|}n|j|�q/W||_	n|r�|j
r�g|j
D]}|j|�^q�|_
ndS(Nt.(tsuperR�R(R
Rtfieldstnamet
table_nametappendt_fieldsRR(RR�tfR�Rn((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR(ws		cC@s)|dkrdS|jt|j|��S(N(R	t	dict_typetzipR�(RR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�s(R�R�R<R�R(R(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�ss	t
DictCursorcB@seZdZRS(s.A cursor which returns results as a dictionary(R�R�R�(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR��stSSCursorcB@s}eZdZeZd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
d
�Zdd�ZRS(s�
    Unbuffered Cursor, mainly useful for queries that return a lot of data,
    or for connections to remote servers over a slow network.

    Instead of copying every row of data into a buffer, this will fetch
    rows as needed. The upside of this is the client uses much less memory,
    and rows are returned much faster when traveling over a slow network
    or if the result set is very big.

    There are limitations, though. The MySQL protocol doesn't support
    returning the total number of rows, so the only way to tell how many rows
    there are is to iterate over every row returned. Also, it currently isn't
    possible to scroll backwards, as only the current row is held in memory.
    cC@s|S(N((RR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�scC@sr|j}|dkrdS|jdk	rJ|j|jkrJ|jj�nzx|j�r_qPWWdd|_XdS(N(RR	Rt_finish_unbuffered_queryR(RR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�s	!cC@s9|j�}||_|j|dt�|j�|jS(NR$(RRpR@R)R(R(RR`R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRB�s
	
cC@s|jdt�S(NR$(R+R)(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�scC@s|j|jj��S(s
Read next row(RRt_read_rowdata_packet_unbuffered(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt	read_next�scC@sC|j�|j�}|dkr0|j�dS|jd7_|S(sFetch next rowiN(RR�R	R%R(RR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRc�s

cC@st|j��S(s�
        Fetch all, as per MySQLdb. Pretty useless for large queries, as
        it is buffered. See fetchall_unbuffered(), if you want an unbuffered
        generator version of this method.
        (R3tfetchall_unbuffered(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRh�scC@st|jd�S(s�
        Fetch all, implemented as a generator, which isn't to standard,
        however, it doesn't make sense to return everything in a list, as that
        would use ridiculous memory for large result sets.
        N(RTRcR	(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR��scC@s
|j�S(N(R�(R((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR��scC@s�|j�|dkr"|j}ng}xVt|�D]H}|j�}|dkra|j�Pn|j|�|jd7_q5W|S(s
Fetch manyiN(RR	R
RR�R%R�R(RReR[RaR((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRg�s


RicC@s�|j�|dkrg|dkr4tjd��nxt|�D]}|j�qAW|j|7_nz|dkr�||jkr�tjd��n||j}xt|�D]}|j�q�W||_ntjd|��dS(NRiis0Backwards scrolling not supported by this cursorRjsunknown scroll mode %s(RRR�RR�RR(RRlRmt_Rf((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyRo�s"

N(R�R�R�R)RtRRRBRR�RcRhR�R�R	RgRo(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR��s						
			tSSDictCursorcB@seZdZRS(s;An unbuffered cursor, which returns results as a dictionary(R�R�R�(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyR�s(t
__future__RRt	functoolsRtreRzt_compatRRRR"Rtcompilet
IGNORECASEtDOTALLREtobjectRR�R�R�R�(((s3/usr/lib/python2.7/site-packages/pymysql/cursors.pyt<module>s�_v

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
28 Feb 2025 12.50 AM
root / root
0755
constants
--
25 Jan 2024 4.20 PM
root / root
0755
tests
--
25 Jan 2024 4.20 PM
root / root
0755
__init__.py
4.491 KB
20 Dec 2017 12.18 PM
root / root
0644
__init__.pyc
5.47 KB
21 Apr 2022 1.39 PM
root / root
0644
__init__.pyo
5.47 KB
21 Apr 2022 1.39 PM
root / root
0644
_compat.py
0.47 KB
18 May 2016 9.03 AM
root / root
0644
_compat.pyc
0.682 KB
21 Apr 2022 1.39 PM
root / root
0644
_compat.pyo
0.682 KB
21 Apr 2022 1.39 PM
root / root
0644
_socketio.py
3.954 KB
4 Feb 2015 5.38 AM
root / root
0644
_socketio.pyc
4.709 KB
21 Apr 2022 1.39 PM
root / root
0644
_socketio.pyo
4.709 KB
21 Apr 2022 1.39 PM
root / root
0644
charset.py
13.457 KB
29 Aug 2016 8.21 AM
root / root
0644
charset.pyc
13.792 KB
21 Apr 2022 1.39 PM
root / root
0644
charset.pyo
13.792 KB
21 Apr 2022 1.39 PM
root / root
0644
connections.py
56.745 KB
20 Dec 2017 12.38 PM
root / root
0644
connections.pyc
53.451 KB
21 Apr 2022 1.39 PM
root / root
0644
connections.pyo
53.383 KB
21 Apr 2022 1.39 PM
root / root
0644
converters.py
12.443 KB
20 Dec 2017 12.16 PM
root / root
0644
converters.pyc
14.487 KB
21 Apr 2022 1.39 PM
root / root
0644
converters.pyo
14.335 KB
21 Apr 2022 1.39 PM
root / root
0644
cursors.py
16.367 KB
20 Dec 2017 9.29 AM
root / root
0644
cursors.pyc
18.894 KB
21 Apr 2022 1.39 PM
root / root
0644
cursors.pyo
18.814 KB
21 Apr 2022 1.39 PM
root / root
0644
err.py
3.549 KB
20 Dec 2017 9.29 AM
root / root
0644
err.pyc
5.599 KB
21 Apr 2022 1.39 PM
root / root
0644
err.pyo
5.599 KB
21 Apr 2022 1.39 PM
root / root
0644
optionfile.py
0.643 KB
30 Aug 2017 10.38 AM
root / root
0644
optionfile.pyc
1.295 KB
21 Apr 2022 1.39 PM
root / root
0644
optionfile.pyo
1.295 KB
21 Apr 2022 1.39 PM
root / root
0644
times.py
0.352 KB
29 Aug 2016 11.57 AM
root / root
0644
times.pyc
0.922 KB
21 Apr 2022 1.39 PM
root / root
0644
times.pyo
0.922 KB
21 Apr 2022 1.39 PM
root / root
0644
util.py
0.324 KB
29 Jun 2017 7.34 AM
root / root
0644
util.pyc
0.838 KB
21 Apr 2022 1.39 PM
root / root
0644
util.pyo
0.838 KB
21 Apr 2022 1.39 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF