1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Ë
’^i—@ãóâ—ddlZddlZddlmZejdej
ej z«ZGd„d«ZGd„d«Z    Gd    „d
e    e«Z
Gd „d e«Z Gd „de    e «Z y)éNé)Úerrz|\s*((?:INSERT|REPLACE)\b.+\bVALUES?\s*)(\(\s*(?:%s|%\(.+\)s)\s*(?:,\s*(?:%s|%\(.+\)s)\s*)*\))(\s*(?:ON DUPLICATE.*)?);?\s*\Zcó—eZdZdZdZd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z d „Z dd „Zd „Zd„Zd d„Zd d„Zd„Zd„Zd!d„Zd„Zd d„Zd„Zd"d„Zd„Zd„Zd„Zd„Zd„Zd„Zy)#ÚCursora
    This is the object used to interact with the database.
 
    Do not create an instance of a Cursor yourself. Call
    connections.Connection.cursor().
 
    See `Cursor <https://www.python.org/dev/peps/pep-0249/#cursor-objects>`_ in
    the specification.
    i có‚—||_d|_d|_d|_d|_d|_d|_d|_d|_y)Nréÿÿÿÿr)    Ú
connectionÚ warning_countÚ descriptionÚ    rownumberÚrowcountÚ    arraysizeÚ    _executedÚ_resultÚ_rows)Úselfr    s  õbH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\pymysql/cursors.pyÚ__init__zCursor.__init__"sC€Ø$ˆŒØˆÔØˆÔØˆŒØˆŒ ؈ŒØˆŒØˆŒ ؈
ócóŽ—|j}|€y    |j«r    |j«rŒd|_y#d|_wxYw)zD
        Closing a cursor just exhausts all remaining data.
        N)r    Únextset©rÚconns  rÚclosez Cursor.close-sB€ð‰ˆØ ˆ<Ø ð    #Ø—,‘,”.Øð—,‘,•.ð#ˆDOø˜dˆDOús    ‘!;»    Acó—|S©N©©rs rÚ    __enter__zCursor.__enter__:ó€Øˆ rcó&—~|j«yr)r)rÚexc_infos  rÚ__exit__zCursor.__exit__=s€Ø Ø 
‰
 rcó\—|jstjd«‚|jS)Nz Cursor closed)r    rÚProgrammingErrorrs rÚ_get_dbzCursor._get_dbAs$€ØŠÜ×&Ñ& Ó7Ð 7؏‰ÐrcóF—|jstjd«‚y)Nzexecute() first)rrr%rs rÚ_check_executedzCursor._check_executedFs €Ø~Š~Ü×&Ñ&Ð'8Ó9Ð 9ðrcó—|Srr©rÚrows  rÚ    _conv_rowzCursor._conv_rowJó€Øˆ
rcó—y©z!Does nothing, required by DB API.Nr©rÚargss  rÚ setinputsizeszCursor.setinputsizesMórcó—yr/rr0s  rÚsetoutputsizeszCursor.setoutputsizesPr3rcóê—|j«}|j}|||jury|jsyd|_|j«|j    |¬«|j «y)zGet the next query set.N©Ú
unbufferedT)r&rÚhas_nextÚ _clear_resultÚ next_resultÚ_do_get_result)rr8rÚcurrent_results    rÚ_nextsetzCursor._nextsetSsi€à|‰|‹~ˆØŸ™ˆØ Ð ! ^¸4¿<¹<Ñ%GØØ×&Ò&ØØˆŒ Ø ×ÑÔØ ×Ñ JÐÔ/Ø ×ÑÔØrcó$—|jd«S)NF©r>rs rrzCursor.nextsetas€Ø}‰}˜UÓ#Ð#rcó ‡—t|ttf«rtˆfd„|D««St|t«r3|j    «Dcic]\}}|‰j |«“Œc}}S‰j |«Scc}}w)Nc3ó@•K—|]}‰j|«–—Œy­wr)Úliteral)Ú.0Úargrs  €rú    <genexpr>z&Cursor._escape_args.<locals>.<genexpr>fsøèø€Ò;¨s˜Ÿ™ c×*Ñ;ùsƒ)Ú
isinstanceÚtupleÚlistÚdictÚitemsrCÚescape)rr1rÚkeyÚvals  `  rÚ _escape_argszCursor._escape_argsdslø€Ü dœU¤D˜MÔ *ÜÓ;°dÔ;Ó;Ð ;Ü ˜œdÔ #Ø=A¿Z¹Z»\×J©z°°SC˜Ÿ™ cÓ*Ñ*ÓJÐ Jð—;‘;˜tÓ$Ð $ùó    KsÁBNcóT—|j«}|||j||«z}|S)a¾
        Returns the exact string that would be sent to the database by calling the
        execute() method.
 
        :param query: Query to mogrify.
        :type query: str
 
        :param args: Parameters used with query. (optional)
        :type args: tuple, list or dict
 
        :return: The query with argument binding applied.
        :rtype: str
 
        This method follows the extension to the DB API 2.0 followed by Psycopg.
        )r&rO)rÚqueryr1rs    rÚmogrifyzCursor.mogrifyns1€ð |‰|‹~ˆà РؘD×-Ñ-¨d°DÓ9Ñ9ˆEàˆ rcóž—|j«r    |j«rŒ|j||«}|j|«}||_|S)a¡Execute a query.
 
        :param query: Query to execute.
        :type query: str
 
        :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.
        )rrRÚ_queryr)rrQr1Úresults    rÚexecutezCursor.execute…sG€ðl‰lŒnØ ðl‰lnð— ‘ ˜U DÓ)ˆà—‘˜UÓ#ˆØˆŒØˆ rc    óª‡‡—|sytj‰«}|r’|jd«dz}|jd«j«}|jd«xsd}|ddk(r|d    d
k(sJ‚‰j    ||||‰j
‰j «j«Stˆˆfd „|D««‰_    ‰jS) aÏRun several data against one query.
 
        :param query: Query to execute.
        :type query: str
 
        :param args: Sequence of sequences or mappings. It is used as parameter.
        :type args: tuple or list
 
        :return: Number of rows affected, if any.
        :rtype: int or None
 
        This method improves performance on multiple-row INSERT and
        REPLACE. Otherwise it is equivalent to looping over args with
        execute().
        NrrééÚrú(rú)c3óB•K—|]}‰j‰|«–—Œy­wr)rV)rDrErQrs  €€rrFz%Cursor.executemany.<locals>.<genexpr>¿søèø€ÒE¸˜DŸL™L¨°×4ÑEùsƒ)
ÚRE_INSERT_VALUESÚmatchÚgroupÚrstripÚ_do_execute_manyÚmax_stmt_lengthr&ÚencodingÚsumr )rrQr1ÚmÚq_prefixÚq_valuesÚ    q_postfixs``     rÚ executemanyzCursor.executemanysÉù€ñ Ø ä × "Ñ " 5Ó )ˆÙ Ø—w‘w˜q“z B‘ˆHØ—w‘w˜q“z×(Ñ(Ó*ˆHØŸ™ ›
Ò( bˆIؘA‘; #Ò%¨(°2©,¸#Ò*=Ð =Ð=Ø×(Ñ(ØØØØØ×$Ñ$Ø— ‘ “×'Ñ'ó ð ôÔEÀÔEÓEˆŒ ؏}‰}Ðrcó¼—|j«}|j}t|t«r|j    |«}t|t«r|j    |«}t |«}    t |«}||t|«|«z}
t|
t«r|
j    |d«}
|    |
z }    d} |D]†} ||| |«z}
t|
t«r|
j    |d«}
t|    «t|
«zt|«zdz|kDr#| |j|    |z«z } t |«}    n|    dz }    |    |
z }    Œˆ| |j|    |z«z } | |_
| S)NÚsurrogateescaperró,) r&rOrGÚstrÚencodeÚ    bytearrayÚiterÚnextÚlenrVr ) rÚprefixÚvaluesÚpostfixr1rcrdrrLÚsqlÚvÚrowsrEs              rrbzCursor._do_execute_manyÂsQ€ð|‰|‹~ˆØ×"Ñ"ˆÜ fœcÔ "Ø—]‘] 8Ó,ˆFÜ gœsÔ #Ø—n‘n XÓ.ˆGܘӈܐD‹zˆØ ‘VœD ›J¨Ó-Ñ -ˆÜ aœÔ Ø—‘˜Ð#4Ó5ˆAØ ˆq‰ˆØˆØò        ˆCØ™  TÓ*Ñ*ˆAܘ!œSÔ!Ø—H‘H˜XÐ'8Ó9Ü3‹xœ#˜a›&Ñ ¤3 w£<Ñ/°!Ñ3°oÒEؘŸ ™  S¨7¡]Ó3Ñ3Ü Ó'‘àt‘ Ø 1‰H‰Cð        ð     — ‘ ˜S 7™]Ó+Ñ+ˆØˆŒ ؈ rc 󌇇—|j«Š|rLd|›dŠ|jddjˆˆfd„t|«D««z«|j    «dj |djt t|««Dcgc]    }d||fz‘Œ c}««}|j|«||_|Scc}w)abExecute stored procedure procname with args.
 
        :param procname: Name of procedure to execute on server.
        :type procname: str
 
        :param args: Sequence of parameters to use with procedure.
        :type args: tuple or list
 
        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.
        z@_z_%d=%szSET %sú,c3óP•K—|]\}}‰|‰j|«fz–—Œy­wr)rL)rDÚindexrErÚfmts   €€rrFz"Cursor.callproc.<locals>.<genexpr>s-øèø€òÙ8B¸¸sC˜5 $§+¡+¨cÓ"2Ð3Õ3ñùsƒ#&z CALL {}({})z@_%s_%d)    r&rTÚjoinÚ    enumeraterÚformatÚrangersr)rÚprocnamer1ÚiÚqrr~s     @@rÚcallproczCursor.callprocàs¹ù€ð<|‰|‹~ˆÙ ؐxj Ð'ˆCØ K‰KØØ—(‘(ôÜFOÐPTÃoôóñô ð L‰LŒNà ×  Ñ  Ø Ø H‰H¼¼sÀ4»yÓ9IÖJ°Ai 8¨Q -Ó/ÒJÓ Kó
ˆð      ‰ AŒØˆŒØˆ ùò    KsÂCcóà—|j«|j"|jt|j«k\ry|j|j}|xjdz c_|S)zFetch the next row.Nr©r(rr rs©rrUs  rÚfetchonezCursor.fetchonesS€à ×ÑÔØ :‰:Ð  §¡´3°t·z±z³?Ò!BØØ—‘˜DŸN™NÑ+ˆØ Š˜!э؈ rcóô—|j«|j€y|j|xs |jz}|j|j|}t    |t |j««|_|S)zFetch several rows.r)r(rr rÚminrs)rÚsizeÚendrUs    rÚ    fetchmanyzCursor.fetchmanysc€à ×ÑÔØ :‰:Ð ð؏n‰n Ò 6¨¯©Ñ7ˆØ—‘˜DŸN™N¨SÐ1ˆÜ˜S¤# d§j¡j£/Ó2ˆŒØˆ rcóڗ|j«|j€gS|jr|j|jd}n |j}t|j«|_|S)zFetch all the rows.Nrˆr‰s  rÚfetchallzCursor.fetchall&sV€à ×ÑÔØ :‰:Р؈IØ >Š>Ø—Z‘Z §¡Р0Ð1‰Fà—Z‘ZˆFܘTŸZ™Z›ˆŒØˆ rcó—|j«|dk(r|j|z}n |dk(r|}ntjd|z«‚d|cxkr"t    |j
«kst d«‚t d«‚||_y)NÚrelativeÚabsoluteúunknown scroll mode %srz out of range)r(r rr%rsrÚ
IndexError)rÚvalueÚmodeÚrs    rÚscrollz Cursor.scroll2s€Ø ×ÑÔØ :Ò Ø—‘ Ñ&‰AØ ZÒ Ø‰Aä×&Ñ&Ð'?À$Ñ'FÓGÐ GàQÔ(œ˜TŸZ™Z›Ò(ܘ^Ó,Ð ,ð)ܘ^Ó,Ð ,؈rcóœ—|j«}|j«|j|«|j«|jSr©r&r:rQr<r ©rr…rs   rrTz Cursor._query?s:€Ø|‰|‹~ˆØ ×ÑÔØ 
‰
1Œ Ø ×ÑÔØ}‰}Ðrcóf—d|_d|_d|_d|_d|_d|_d|_y)Nr)r rr r
r Ú    lastrowidrrs rr:zCursor._clear_resultFs5€ØˆŒØˆŒ àˆŒ ØˆÔØˆÔ؈ŒØˆ
rcóô—|j«}|jx|_}|j|_|j|_|j
|_|j |_|j|_    yr)
r&rÚ affected_rowsr r
r Ú    insert_idrŸryr)rrrUs   rr<zCursor._do_get_resultPs^€Ø|‰|‹~ˆà $§ ¡ Ð,ˆŒ và×,Ñ,ˆŒ Ø#×1Ñ1ˆÔØ!×-Ñ-ˆÔØ×)Ñ)ˆŒØ—[‘[ˆ
rcó—|Srrrs rÚ__iter__zCursor.__iter__[r rcó6—|j«}|€t‚|Sr)rŠÚ StopIterationr*s  rÚ__next__zCursor.__next__^s€Øm‰m‹oˆØ ˆ;ÜР؈
rcóx—|dvr,tjdtd¬«tt|«St |«‚)N)
ÚWarningÚErrorÚInterfaceErrorÚ DatabaseErrorÚ    DataErrorÚOperationalErrorÚIntegrityErrorÚ InternalErrorr%ÚNotSupportedErrorz7PyMySQL errors hould be accessed from `pymysql` packagerX)Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarningÚgetattrrÚAttributeError)rÚnames  rÚ __getattr__zCursor.__getattr__dsB€ð ð 
ñ
ô M‰MØIÜ"Øõ ô
œ3 Ó%Ð %ܘTÓ"Ð"r)Fr)r©r“) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rcrrrr#r&r(r,r2r5r>rrOrRrVrjrbr†rŠrr‘ršrTr:r<r¤r§r¹rrrrrs—„ñð€Oò    ò #òòòò
:òò0ò0ó ò$ò%óó.ò0#òJó</òbó
ò
ó òòò    !òòó #rrcó(‡—eZdZeZˆfd„Zd„ZˆxZS)ÚDictCursorMixincón•—t‰|«g}|jrU|jjD]5}|j
}||vr|j dz|z}|j|«Œ7||_|r<|jr/|jDcgc]}|j|«‘Œc}|_    yyycc}w)Nú.) Úsuperr<r rÚfieldsr¸Ú
table_nameÚappendÚ_fieldsrr,)rrÄÚfr¸r™Ú    __class__s     €rr<zDictCursorMixin._do_get_resultsŸø€Ü ‰ÑÔ ØˆØ × Ò Ø—\‘\×(Ñ(ò $Ø—v‘vØ˜6‘>ØŸ<™<¨#Ñ-°Ñ4DØ— ‘ ˜dÕ#ð     $ð
"ˆDŒLá d—j’jØ59·Z±ZÖ@°˜$Ÿ.™.¨Õ+Ò@ˆDJð!ˆ6ùÚ@sÂB2cóR—|€y|jt|j|««Sr)Ú    dict_typeÚziprÇr*s  rr,zDictCursorMixin._conv_rows$€Ø ˆ;ØØ~‰~œc $§,¡,°Ó4Ó5Ð5r)r»r¼r½rJrËr<r,Ú __classcell__)rÉs@rrÀrÀ}sø„à€Iô Aö6rrÀcó—eZdZdZy)Ú
DictCursorz.A cursor which returns results as a dictionaryN©r»r¼r½r¾rrrrÏrϕs„Ú8rrÏcóT—eZdZdZd„Zd„ZeZd„Zd„Zd„Z    d„Z
d„Z d    „Z d d „Z dd „Zy
)ÚSSCursoraÃ
    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.
    có—|Srrr*s  rr,zSSCursor._conv_row©r-rcó
—|j}|€y|j2|j|jur|jj«    |j«r    |j«rŒd|_y#d|_wxYwr)r    rÚ_finish_unbuffered_queryrrs  rrzSSCursor.close¬si€Ø‰ˆØ ˆ<Ø à <‰<Ð #¨¯ © ¸¿ ¹ Ñ(DØ L‰L× 1Ñ 1Ô 3ð    #Ø—,‘,”.Øð—,‘,•.ð#ˆDOø˜dˆDOús Á!A9Á9    Bcó —|j«}|j«|j|d¬«|j«|jS©NTr7rœrs   rrTzSSCursor._query¼s?€Ø|‰|‹~ˆØ ×ÑÔØ 
‰
1 ˆ
Ô&Ø ×ÑÔØ}‰}Ðrcó&—|jd¬«Sr×r@rs rrzSSCursor.nextsetÃs€Ø}‰}¨ˆ}Ó-Ð-rcóT—|j|jj««S)zRead next row.)r,rÚ_read_rowdata_packet_unbufferedrs rÚ    read_nextzSSCursor.read_nextÆs€à~‰~˜dŸl™l×JÑJÓLÓMÐMrcó¬—|j«|j«}|€|jj|_y|xjdz c_|S)zFetch next row.Nr)r(rÛrr
r r*s  rrŠzSSCursor.fetchoneÊsG€à ×ÑÔØn‰nÓˆØ ˆ;Ø!%§¡×!;Ñ!;ˆDÔ ØØ Š˜!э؈
rcó4—t|j««S)zÈ
        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.
        )rIÚfetchall_unbufferedrs rr‘zSSCursor.fetchallÔs€ô D×,Ñ,Ó.Ó/Ð/rcó.—t|jd«S)zÛ
        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)rqrŠrs rrÞzSSCursor.fetchall_unbufferedÜs€ô D—M‘M 4Ó(Ð(rNcó—|j«|€ |j}g}t|«D]W}|j«}|€|jj
|_n(|j |«|xjdz c_ŒY|sy|S)z Fetch many.rr)r(rr‚rÛrr
rÆr )rrryr„r+s     rrzSSCursor.fetchmanyäsƒ€à ×ÑÔØ ˆ<Ø—>‘>ˆDàˆÜt“ò     ˆAØ—.‘.Ó"ˆC؈{Ø%)§\¡\×%?Ñ%?Ô"ÙØ K‰K˜Ô Ø NŠN˜aÑ ŽNð      ñðØˆ rcó¼—|j«|dk(rP|dkrtjd«‚t|«D]}|j    «Œ|xj
|z c_y|dk(r[||j
krtjd«‚||j
z
}t|«D]}|j    «Œ||_ytj d|z«‚)Nr“rz0Backwards scrolling not supported by this cursorr”r•)r(rr±r‚rÛr r%)rr—r˜Ú_rŽs     rršzSSCursor.scrolløsՀØ ×ÑÔà :Ò ØqŠyÜ×+Ñ+ØFóðô˜5“\ò !Ø—‘Õ ð !à NŠN˜eÑ #ŽNØ ZÒ Øt—~‘~Ò%Ü×+Ñ+ØFóðð˜$Ÿ.™.Ñ(ˆCܘ3“Zò !Ø—‘Õ ð !à"ˆDNä×&Ñ&Ð'?À$Ñ'FÓGÐ Grrrº)r»r¼r½r¾r,rÚ__del__rTrrÛrŠr‘rÞrršrrrrÒrҙsB„ñ òò #ð€Gòò.òNòò0ò)óô(HrrÒcó—eZdZdZy)Ú SSDictCursorz;An unbuffered cursor, which returns results as a dictionaryNrÐrrrrårås„ÚErrå) Úrer³rZrÚcompileÚ
IGNORECASEÚDOTALLr^rrÀrÏrÒrårrrú<module>rês~ðÛ    ÛÝð 2—:‘:ð)ð‡MMB—I‘IÑó    Ð÷i#ñi#÷X 6ñ6ô09 &ô9ôvHˆvôvHôrF? HõFr