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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
U
£ý°dñã    @sÞUdZddlmZddlZddlZddlZddlZddlmZm    Z    ddl
m Z m
Z
m Z m Z ddlmZddlmZddl mZdd    lmZdd
lmZmZmZmZmZmZmZmZmZmZm Z m!Z!d Z"z ddl#Z#e$e#d ƒräe#j%räd Z"Wne&k
rúYnXddl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ddl0m1Z1m2Z2ddl3m4Z4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:ddlm;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAe B¡ZCdeDd<dZEdZFdZGdZHdZIeeJe e
eKeLeMe e f    ZNGdd„deƒZOGdd„deƒZPdS)z+Module gathering all abstract base classes.é)Ú annotationsN)ÚABCÚabstractmethod)ÚdateÚdatetimeÚtimeÚ    timedelta)ÚDecimal)Ú    signature)Úsleep)Ú TracebackType) ÚAnyÚBinaryIOÚCallableÚDictÚ    GeneratorÚListÚMappingÚOptionalÚSequenceÚTupleÚTypeÚUnionFÚ HAS_TLSv1_3Té)Ú CONN_ATTRS_DNÚDEFAULT_CONFIGURATIONÚDEPRECATED_TLS_VERSIONSÚOPENSSL_CS_NAMESÚTLS_CIPHER_SUITESÚ TLS_VERSIONSÚ CharacterSetÚ
ClientFlag)ÚMySQLConverterÚMySQLConverterBase)ÚErrorÚInterfaceErrorÚNotSupportedErrorÚOperationalErrorÚProgrammingError)Úread_option_files)Ú ConnAttrsTypeÚDescriptionTypeÚ HandShakeTypeÚ QueryAttrTypeÚ
StrOrBytesÚ!SupportedMysqlBinaryProtocolTypesÚ WarningTypez%weakref.WeakValueDictionary[Any, Any]ÚNAMED_TUPLE_CACHEzVThe '{list}' list must not contain repeated values, the value '{value}' is duplicated.zdThe given tls_version: '{}' is not recognized as a valid TLS protocol version (should be one of {}).zHThe given tls_version: '{}' are no longer allowed (should be one of {}).zINo supported TLS protocol version found in the 'tls-versions' list '{}'. aOption "krb_service_principal" {error}, must be a string in the form "primary/instance@realm" e.g "ldap/ldapauth@MYSQL.COM" where "@realm" is optional and if it is not given will be assumed to belong to the default realm, as configured in the krb5.conf file.c @s
eZdZUdZddœdd„Zddœdd„Zdd    d
dd œd d „Zddœdd„Zeddœdd„ƒZ    eddœdd„ƒZ
eddœdd„ƒZ dddœdd„Z ddœdd„Z ddœdd„Zddœd d!„Zed"dœd#d$„ƒZed"dœd%d&„ƒZed'dœd(d)„ƒZed*dœd+d,„ƒZeed"dœd-d.„ƒƒZejd"ddœd/d.„ƒZeddœd0d1„ƒZejdddœd2d1„ƒZed3dœd4d5„ƒZejd3ddœd6d5„ƒZd3dd7œd8d9„Zd3dœd:d;„Zed<d=d>œd?d@„ƒZd=dœdAdB„Zd*dœdCdD„Zeed3dœdEdF„ƒƒZdGd'dHœdIdJ„Z d'ddKœdLdM„Z!ed"dœdNdO„ƒZ"e"jd"ddœdPdO„ƒZ"ed"dœdQdR„ƒZ#e#jdSddœdTdR„ƒZ#ed3d3dUœdVdW„ƒZ$dßd*d*ddYœdZd[„Z%dàdddœd]d^„Z&eddœd_d`„ƒZ'e'jdddœdad`„ƒZ'eddœdbdc„ƒZ(e(jdddœdddc„ƒZ(eddœdedf„ƒZ)e)jdddœdgdf„ƒZ)eddœdhdi„ƒZ*e*jdddœdjdi„ƒZ*ed"dœdkdl„ƒZ+ed"dœdmdn„ƒZ,dádod*ddpœdqdr„Z-ed"dœdsdt„ƒZ.ed3dœdudv„ƒZ/ed3dœdwdx„ƒZ0ddœdydz„Z1ed3dœd{d|„ƒZ2e2Z3d}e4d~<d3dd7œdd€„Z5dâd'd'ddƒœd„d…„Z6ed3dœd†d‡„ƒZ7edãdd'd'd3d‰œdŠd‹„ƒZ8ed3dœdŒd„ƒZ9edädŽdŽdŽddŽdŽdd‘œd’d“„ƒZ:ed3d3dUœd”d•„ƒZ;ed3dœd–d—„ƒZ<dådd*dŽdd˜œd™dš„Z=dæd›d›ddœœddž„Z>dŸdd œd¡d¢„Z?edçd£dd¤dŽd3d¥d¦œd§d¨„ƒZ@d"d©dªœd«d¬„ZAdèd3dddd©d­œd®d¯„ZBd3d°d±œd²d³„ZCd'd©d´œdµd¶„ZDd3dœd·d¸„ZEdéd£d©d¹œdºd»„ZFd©dœd¼d½„ZGed3dœd¾d¿„ƒZHd'd©dÀœdÁd„ZId©dœdÃdĄZJd©dœdÅdƄZKdêd"d"d"d'd"d"d"d"d©dɜ    dÊd˄ZLd3d©d̜dÍd΄ZMdëd3dÐdÐd'd3dќdÒdӄZNd3d3dԜdÕdքZOd3d'd×d3d؜dÙdڄZPd3d3dԜdÛd܄ZQd3dœdÝdބZRdXS)ìÚMySQLConnectionAbstractz7Abstract class for classes connecting to a MySQL serverÚNone©ÚreturncCs>t ¡|_d|_d|_d|_d|_d|_d|_i|_    d|_
d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_i|_td|_d|_d|_d|_d|_d|_d    |_d|_d|_td
|_ d|_!d|_"d|_#d|_$d|_%td |_&td |_'d|_(g|_)d|_*d|_+d|_,d|_-d|_.d|_/d|_0d|_1d|_2d|_3dS) Z
Initializeé-NFÚz    127.0.0.1iê rÚ ssl_disabledTÚconnect_timeoutÚallow_local_infileÚallow_local_infile_in_path)4r"Ú get_defaultÚ _client_flagsÚ _charset_idÚ    _sql_modeÚ
_time_zoneÚ _autocommitÚ_server_versionÚ
_handshakeÚ _conn_attrsÚ_userÚ    _passwordZ
_password1Z
_password2Z
_password3Ú    _databaseÚ_hostÚ_portÚ _unix_socketZ _client_hostZ _client_portÚ_sslrÚ _ssl_disabledZ _force_ipv6Z_oci_config_fileZ_oci_config_profileÚ_fido_callbackÚ_krb_service_principalÚ _use_unicodeÚ _get_warningsÚ_raise_on_warningsZ_connection_timeoutZ    _bufferedÚ_unread_resultÚ_have_next_resultÚ_rawZ_in_transactionÚ_allow_local_infileÚ_allow_local_infile_in_pathZ_prepared_statementsÚ _query_attrsÚ _ssl_activeÚ _auth_pluginÚ_auth_plugin_classÚ_pool_config_versionÚ    converterÚ_converter_classÚ_converter_str_fallbackÚ    _compressÚ_consume_resultsÚ _init_command©Úself©reúPd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\mysql/connector/abstracts.pyÚ__init__sj
 
ÿ
ÿz MySQLConnectionAbstract.__init__cCs|S©NrercrererfÚ    __enter__Ìsz!MySQLConnectionAbstract.__enter__úType[BaseException]Ú BaseExceptionr ©Úexc_typeÚ    exc_valueÚ    tracebackr6cCs | ¡dSrh©Úclose©rdrmrnrorererfÚ__exit__Ïsz MySQLConnectionAbstract.__exit__cCs|S)zˆReturn self for weakref.proxy
 
        This method is used when the original object is needed when using
        weakref.proxy.
        rercrererfÚget_self×sz MySQLConnectionAbstract.get_selfÚboolcCs|jp|jdk    otjdkS)z&Return True if is a secure connection.NÚposix)rYrKÚosÚnamercrererfÚ    is_secureßsÿz!MySQLConnectionAbstract.is_securecCs|jS)zReturn if have next result.)rTrcrererfÚhave_next_resultæsz(MySQLConnectionAbstract.have_next_resultr.cCs|jS)zReturn query attributes list.©rXrcrererfÚ query_attrsësz#MySQLConnectionAbstract.query_attrsz-Tuple[str, SupportedMysqlBinaryProtocolTypes])Úvaluer6cCs|j |¡dS)z)Add element to the query attributes list.N)rXÚappend©rdr}rererfÚquery_attrs_appendðsz*MySQLConnectionAbstract.query_attrs_appendcCs|jdd…=dS)zClear query attributes list.Nr{rcrererfÚquery_attrs_clearösz)MySQLConnectionAbstract.query_attrs_clearc Cs@g}|jd}t|tƒr€| d¡r,| d¡s<td|›dƒ‚|dd… d¡}|sZtd    ƒ‚|D]}| ¡ ¡}|r^|     |¡q^n.t|t
t fƒržd
d „|Dƒ}ntd |›dƒ‚|j  d d¡dkrÌt dd…n|jd dd…}|jdd|d}ggg}i}g}    t dt  |¡d…D]"}
| t|
¡|     t|
¡q|D]¼} d| kr†| |    kr†| tdkrv|d     | ¡n|d     | ¡nt| |krê|| } | |kr´ttjd| dƒ‚| tdkrÖ|d     || ¡n|d     || ¡ntd| ›dƒ‚q@|ds|dstdƒ‚d |d¡d |d¡g|jd<dS)z&Validates the tls_ciphersuites option.Útls_ciphersuitesú[ú]z)tls_ciphersuites must be a list, found: 'ú'réÿÿÿÿú,z6No valid cipher suite found in 'tls_ciphersuites' listcSsg|] }|r|‘qSrere)Ú.0Útls_csrererfÚ
<listcomp>szFMySQLConnectionAbstract._validate_tls_ciphersuites.<locals>.<listcomp>zItls_ciphersuites should be a list with one or more ciphersuites. Found: 'Ú tls_versionsNT)Úreverserú-úTLSv1.3©Úlistr}z The value 'z1' in tls_ciphersuites is not a valid cipher suitez:No valid cipher suite found in the 'tls_ciphersuites' listú:)rLÚ
isinstanceÚstrÚ
startswithÚendswithÚAttributeErrorÚsplitÚstripÚupperr~rÚsetÚgetr ÚsortÚindexÚupdaterÚextendrÚDUPLICATED_IN_LIST_ERRORÚformatÚjoin) rdr‚r‰Ztls_cssZ_tls_csr‹Z newer_tls_verZtranslated_namesZiani_cipher_suites_namesZossl_cipher_suites_namesÚtls_verrxZtranslated_namerererfÚ_validate_tls_ciphersuitesúsx
 
 
ÿÿ 
ÿÿý 
 
ÿÿ
ÿÿ  þz2MySQLConnectionAbstract._validate_tls_ciphersuitescCsüg}|jd}t|tƒr®| d¡r,| d¡s<td|›dƒ‚|dd… d¡}|D]:}| ¡}|d    krhqR||kr‚ttj    d|d
ƒ‚| 
|¡qR|d gkr¬t s¬tt      |t ¡ƒ‚n†t|tƒrô|sÄtd ƒ‚|D](}||krættj    d|d
ƒ‚| 
|¡qÈn@t|tƒr|D]}| 
|¡qntd d t ¡›d|›dƒ‚|sBtdƒ‚g}g}g}|D]:}|t krj| 
|¡|tkr€| 
|¡n
| 
|¡qR|rÊ|d gkr¶t s¶tt      |t ¡ƒ‚| ¡||jd<n.|râtt     |t ¡ƒ‚n|røtt     |t ¡ƒ‚dS)z"Validates the tls_versions option.r‹rƒr„z%tls_versions must be a list, found: 'r…rr†r‡r8rrŽzJAt least one TLS protocol version must be specified in 'tls_versions' listz>tls_versions should be a list with one or more of versions in z, z
. found: 'zdAt least one TLS protocol version must be specified in 'tls_versions' list when this option is givenN)rLr’r“r”r•r–r—r˜r r¡r~ÚTLS_V1_3_SUPPORTEDÚTLS_VER_NO_SUPPORTEDr rršr¢rr'rœÚTLS_VERSION_DEPRECATED_ERRORÚTLS_VERSION_ERROR)rdr‹Z tls_versionZtls_versr£Zuse_tls_versionsZdeprecated_tls_versionsZinvalid_tls_versionsrererfÚ_validate_tls_versionsMs’
 
 
ÿÿÿ 
ÿ
ÿÿÿ ÿÿ
 
 
 
ÿ ÿÿz.MySQLConnectionAbstract._validate_tls_versionsr“cCs|jS)z#User used while connecting to MySQL)rFrcrererfÚuserŸszMySQLConnectionAbstract.usercCs|jS)zMySQL server IP address or name)rIrcrererfÚ server_host¤sz#MySQLConnectionAbstract.server_hostÚintcCs|jS)zMySQL server TCP/IP port)rJrcrererfÚ server_port©sz#MySQLConnectionAbstract.server_portz Optional[str]cCs|jS)zMySQL Unix socket file location)rKrcrererfÚ unix_socket®sz#MySQLConnectionAbstract.unix_socketcCsdS)zGet the current databaseNrercrererfÚdatabase³sz MySQLConnectionAbstract.databasecCs| d|›¡dS)zSet the current databasezUSE N)Ú    cmd_queryrrererfr¯¸scCs|jS)z"Returns whether to consume results)rarcrererfÚcan_consume_results½sz+MySQLConnectionAbstract.can_consume_resultscCst|tƒst‚||_dS)zSet if can consume results.N)r’ruÚAssertionErrorrarrererfr±Âsr cCs|jS)z%Return the pool configuration version©r\rcrererfÚpool_config_versionÈsz+MySQLConnectionAbstract.pool_config_versioncCs
||_dS)z"Set the pool configuration versionNr³rrererfr´Ís)Úkwargsr6c
Ks\    | ¡}d|krtdƒ‚tf|Ž}z|d|_|d=Wntk
rJYnXz|d|_|d=Wntk
rtYnXz$t ¡}| |dpŽ|¡|d=Wntk
r®YnXz |drÎd|_    | tj
g¡Wntk
räYnX|  dt d¡|_ |  d    t d    ¡|_d
}|jr\tj |j¡}|rFtj |¡rFtj |¡rTtj |¡r\td ƒ‚|j sl|jr|| tjg¡n| tj g¡z|d s d |_nd|_Wntk
rÄd |_YnXz|d|_|d=Wntk
röd|_YnXd|ks d|krzz|d}|d=Wntk
r8d
}YnXz|d}|d=Wntk
rfd
}YnXt ||¡d|_z| |d¡WnBtk
r¢Yn.tk
rÎ}ztdƒ|‚W5d
}~XYnXdddddg}|D]B\}    }
z |
|kr||    ||
<||    =Wntk
r YnXqâd|ks:d|kr¦z|d} |d=Wntk
rh|j} YnXz|d} |d=Wntk
r˜|j} YnX|  | | ¡d|krÄ|drÄ|d|_!zt"|dƒ|_#|d=WnBtk
ròYn.t$k
r}zt%dƒ|‚W5d
}~XYnXd|kr6| &d¡|_'d |krP|d |_(|d =d } | )¡D]Ì\}}z t |Wn(tk
r˜td!|›d"ƒd
‚YnX| *d#¡rÄd} |j+ ,| -d#d¡|i¡nb| *d$¡ræd} |j+ ,||i¡n@d%|}zt.||| /¡ƒWn"tk
r$t.|||ƒYnXq\|j0rDtj1d&krDd|_'|j'r`|jd'kr`t%d(ƒ‚| r~d)|j+kr€t d*|j+d)<d+|j+kršt d,|j+d+<d-|j+ks¶|j+d-d
krÀd|j+d-<t2d.|j+kƒt2d/|j+kƒkrætd0ƒ‚t3d1ƒt3|j+ƒksd
|j+d.<d
|j+d/<n&|j+d.d
k|j+d/d
kkr6td2ƒ‚d3|j+krZ|j+d3d
k    rZ| 4¡d4|j+kr~|j+d4d
k    r~| 5¡|j6d
kr’i|_6nØt7|j6t8ƒsªt%d5ƒ‚nÀ|j6 )¡D]´\}}|t9krʐq´t7|t:ƒsît%d6|›d7|j6›d"ƒ‚t;|ƒd8kr t%d9|›d:ƒ‚| *d%¡r t%d;ƒ‚t7|t:ƒsBt%d<|›d=|›d>ƒ‚t;|ƒd?kr´t%d<|›d=|›d@ƒ‚q´|j<tj=@r€| >¡dA|krü|dAd
k    rüt7|dAt:ƒs°t%dBƒ‚|dA ?¡}|dCkrâtj1dDkrÚt%dEƒ‚dF|_@n|dGkrôdH|_@nt%dIƒ‚dJ|krt|dJd
k    rt|dJ|_At7|jAt:ƒs<t%tBjCdKdLƒ‚|jAdkrXt%tBjCdMdLƒ‚dN|jAkrtt%tBjCdOdLƒ‚|jD    rXt7|jDt:ƒ    rz|jD EdPdQ¡\}}Wn*t$k
rÊtFdR|jD›d"ƒd
‚YnXztG H|¡}tI||ƒ|_DWn4ttJfk
    r}ztF|›ƒ|‚W5d
}~XYnXtK|jDƒ    s0tFdSƒ‚t;tL|jDƒjMƒ}|dQk    rXtFdT|›ƒ‚d
S)UzConfigure the MySQL Connection
 
        This method allows you to configure the MySQLConnection instance.
 
        Raises on errors.
        Zdsnz!Data source name is not supportedÚ get_warningsÚraise_on_warningsZ client_flagsÚcompressTr;r<Nz.allow_local_infile_in_path must be a directoryZconsume_resultsFZ auth_pluginr8ÚcharsetÚ    collationrZconverter_classzEConverter class should be a subclass of conversion.MySQLConverterBase)Údbr¯)Úusernamerª)ÚpasswdÚpassword)r:Zconnection_timeout)Zread_default_fileZ option_filesrªr¾ÚhostÚportz'TCP/IP port number should be an integerr9Z init_commandzUnsupported argument 'r…Ússl_Ztls_Ú_rvZmysql_clear_passwordzEClear password authentication is not supported over insecure channelsZ verify_certZssl_verify_certZverify_identityZssl_verify_identityÚcaÚkeyÚcertz:ssl_key and ssl_cert need to be both specified, or neither)rÄrÅz4ssl_key and ssl_cert need to be both set, or neitherr‹r‚zconn_attrs must be of type dictz+Attribute name should be a string, found: 'z' in 'é zAttribute name 'z"' exceeds 32 characters limit sizezNKey names in connection attributes cannot start with '_', found: '{attr_name}'z Attribute 'z
' value: 'z' must be a string typeiz$' exceeds 1024 characters limit sizeÚkerberos_auth_modez('kerberos_auth_mode' must be of type strZsspiÚntz6'kerberos_auth_mode=SSPI' is only available on WindowsZMySQLSSPIKerberosAuthPluginZgssapiZMySQLKerberosAuthPluginz@Invalid 'kerberos_auth_mode' mode. Please use 'SSPI' or 'GSSAPI'Zkrb_service_principalzis not a string)Úerrorzcan not be an empty stringú/zis incorrectly formattedÚ.rzNo callable named 'z'Expected a callable for 'fido_callback'zN'fido_callback' requires 1 positional argument, but the callback provided has )NÚcopyr'r*r¶ÚKeyErrorr·r"r=Úset_client_flagsr`ZCOMPRESSr›rrVrWrwÚpathÚabspathÚexistsÚisdirÚislinkr–Z LOCAL_FILESrarZr!Úget_charset_infor?Úset_converter_classÚ    TypeErrorrFrGÚ    set_loginrIr¬rJÚ
ValueErrorr&ÚpoprMrbÚitemsr”rLržÚreplaceÚsetattrr˜rKrxruršr©r¤rEr’Údictrr“Úlenr>Z CONNECT_ARGSÚ_add_default_conn_attrsÚlowerr[rOÚKRB_SERVICE_PINCIPAL_ERRORr¡rNÚrsplitr)Ú    importlibÚ import_moduleÚgetattrÚModuleNotFoundErrorÚcallabler
Ú
parameters)rdrµÚconfigÚdefaultZinfile_in_pathr¹rºÚerrZ
compat_mapÚcompatÚ    translaterªr¾Z set_ssl_flagrÄr}Ú    attributeÚ    attr_nameÚ
attr_valuerÇÚmoduleÚcallbackÚparamsrererfréÒs
 
 
 
 
 
ÿþÿ
þ
ý
ü
 
 
 
 
 
 
 
ÿýú 
 
 
 
 
 
 
 
 
 
   ÿ  ÿ
 
ÿ
 ÿÿ þ 
 
 ÿ
ÿ ÿ ÿÿ 
 ÿ
ÿÿ
þ
 
ÿ ÿÿ 
ÿ ÿþ
 
ÿzMySQLConnectionAbstract.configcCsdS)z&Add the default connection attributes.Nrercrererfrßsz/MySQLConnectionAbstract._add_default_conn_attrsr/zTuple[int, ...])Úserver_versionr6cCspt|ttfƒr| ¡}t d¡}| |¡}|s6tdƒ‚tdd„|     ¡dd…Dƒƒ}|dkrltd|›d    ƒ‚|S)
a7Check the MySQL version
 
        This method will check the MySQL version and raise an InterfaceError
        when it is not supported or invalid. It will return the version
        as a tuple with major, minor and patch.
 
        Raises InterfaceError if invalid server version.
 
        Returns tuple
        z$^(\d{1,2})\.(\d{1,2})\.(\d{1,3})(.*)zFailed parsing MySQL versioncss|]}t|ƒVqdSrh)r¬)rˆÚvrererfÚ    <genexpr>(sz@MySQLConnectionAbstract._check_server_version.<locals>.<genexpr>ré)érzMySQL Version 'z' is not supported)
r’Ú    bytearrayÚbytesÚdecodeÚreÚcompileÚmatchr&ÚtupleÚgroups)rôZ    regex_verrþÚversionrererfÚ_check_server_versions 
 
z-MySQLConnectionAbstract._check_server_versioncCs|jS)z¼Get the MySQL version
 
        This method returns the MySQL server version as a tuple. If not
        previously connected, it will return None.
 
        Returns a tuple or None.
        )rCrcrererfÚget_server_version.sz*MySQLConnectionAbstract.get_server_versionc    Cs,z |jdWSttfk
r&YdSXdS)zÐGet the original MySQL version information
 
        This method returns the original MySQL server as text. If not
        previously connected, it will return None.
 
        Returns a string or None.
        Zserver_version_originalN)rDrÖrÍrcrererfÚget_server_info8s z'MySQLConnectionAbstract.get_server_infocCsdS)z'MySQL session has started a transactionNrercrererfÚin_transactionEsz&MySQLConnectionAbstract.in_transactionzUnion[int, Sequence[int]])Úflagsr6cCsnt|tƒr|dkr||_nNt|ttfƒr`|D]0}|dkrN|jt|ƒM_q,|j|O_q,ntdƒ‚|jS)aSet the client flags
 
        The flags-argument can be either an int or a list (or tuple) of
        ClientFlag-values. If it is an integer, it will set client_flags
        to flags as is.
        If flags is a list (or tuple), each flag will be set or unset
        when it's negative.
 
        set_client_flags([ClientFlag.FOUND_ROWS,-ClientFlag.LONG_FLAG])
 
        Raises ProgrammingError when the flags argument is not a set or
        an integer bigger than 0.
 
        Returns self.client_flags
        rz+set_client_flags expect integer (>0) or set)r’r¬r>rÿrÚabsr))rdrÚflagrererfrÎJsz(MySQLConnectionAbstract.set_client_flags)rr6cCs|j|@dkrdSdS)zCheck if a client flag is setrTF)r>)rdrrererfÚisset_client_flagfsz)MySQLConnectionAbstract.isset_client_flagcCs| d¡dS)zGet the current time zonezSELECT @@session.time_zoner©Ú
info_queryrcrererfÚ    time_zonelsz!MySQLConnectionAbstract.time_zonecCs| d|›d¡||_dS)zSet the time zonezSET @@session.time_zone = 'r…N)r°rArrererfr qscCs |jdkr| d¡d|_|jS)zGet the SQL modeNzSELECT @@session.sql_moder)r@r rcrererfÚsql_modews
z MySQLConnectionAbstract.sql_modezUnion[str, Sequence[int]]cCs4t|ttfƒrd |¡}| d|›d¡||_dS)a“Set the SQL mode
 
        This method sets the SQL Mode for the current connection. The value
        argument can be either a string with comma separate mode names, or
        a sequence of mode names.
 
        It is good practice to use the constants class SQLMode:
          from mysql.connector.constants import SQLMode
          cnx.sql_mode = [SQLMode.NO_ZERO_DATE, SQLMode.REAL_AS_FLOAT]
        r‡zSET @@session.sql_mode = 'r…N)r’rrÿr¢r°r@rrererfr ~s 
)Úqueryr6cCsdS)z%Send a query which only returns 1 rowNre©rdrrererfr sz"MySQLConnectionAbstract.info_queryN)r¼r¾r6cCs4|dk    r| ¡|_nd|_|dk    r*||_nd|_dS)z‡Set login information for MySQL
 
        Set the username and/or password for the user connecting to
        the MySQL Server.
        Nr8)r˜rFrG)rdr¼r¾rererfrדs  z!MySQLConnectionAbstract.set_loginTcCs||_|jr|j |¡dS)zuToggle unicode mode
 
        Set whether we return string fields as unicode or not.
        Default is True.
        N)rPr]Ú set_unicoderrererfr¤sz#MySQLConnectionAbstract.set_unicodecCs| d¡d}|dkS)z#Get whether autocommit is on or offzSELECT @@session.autocommitrrr
rrererfÚ
autocommit®sz"MySQLConnectionAbstract.autocommitcCs&|rdnd}| d|›¡||_dS)zToggle autocommitÚONZOFFzSET @@session.autocommit = N)r°rB)rdr}Úswitchrererfr´s cCs|jS)zåGet whether this connection retrieves warnings automatically
 
        This method returns whether this connection retrieves warnings
        automatically.
 
        Returns True, or False when warnings are not retrieved.
        )rQrcrererfr¶»s    z$MySQLConnectionAbstract.get_warningscCst|tƒstdƒ‚||_dS)zöSet whether warnings should be automatically retrieved
 
        The toggle-argument must be a boolean. When True, cursors for this
        connection will retrieve information about warnings (if any).
 
        Raises ValueError on error.
        úExpected a boolean typeN)r’rurØrQrrererfr¶Æs    
cCs|jS)zÌGet whether this connection raises an error on warnings
 
        This method returns whether this connection will raise errors when
        MySQL reports warnings.
 
        Returns True or False.
        )rRrcrererfr·Ós    z)MySQLConnectionAbstract.raise_on_warningscCs&t|tƒstdƒ‚||_|r"||_dS)aœSet whether warnings raise an error
 
        The toggle-argument must be a boolean. When True, cursors for this
        connection will raise an error when MySQL reports warnings.
 
        Raising on warnings implies retrieving warnings automatically. In
        other words: warnings will be set to True. If set to False, warnings
        will be also set to False.
 
        Raises ValueError on error.
        rN)r’rurØrRrQrrererfr·Þs
 
cCs|jS)zæGet whether there is an unread result
 
        This method is used by cursors to check whether another cursor still
        needs to retrieve its result set.
 
        Returns True, or False when there is no unread result.
        )rSrcrererfÚ unread_resultòs    z%MySQLConnectionAbstract.unread_resultcCst|tƒstdƒ‚||_dS)zÖSet whether there is an unread result
 
        This method is used by cursors to let other cursors know there is
        still a result set that needs to be retrieved.
 
        Raises ValueError on errors.
        rN)r’rurØrSrrererfrýs    
cCst |j¡dS)a+Returns the character set for current connection
 
        This property returns the character set name of the current connection.
        The server is queried when the connection is active. If not connected,
        the configured character set name is returned.
 
        Returns a string.
        r©r!Úget_infor?rcrererfr¹
s
zMySQLConnectionAbstract.charsetcCs t |j¡d}|dkrdS|S)ayReturns the Python character set for current connection
 
        This property returns the character set name of the current connection.
        Note that, unlike property charset, this checks if the previously set
        character set is supported by Python and if not, it returns the
        equivalent character set that Python supports.
 
        Returns a string.
        r)Zutf8mb4Zutf8mb3ÚbinaryÚutf8r)rdÚencodingrererfÚpython_charsets z&MySQLConnectionAbstract.python_charsetzOptional[Union[int, str]])r¹rºr6cCs"d}t|ttfƒs(|dk    r(t| d¡ƒ‚t|tƒsB|dk    rBtdƒ‚|r”t|tƒrdt |¡\|_}}qÌt|tƒr„t ||¡\|_}}qÌt| d¡ƒ‚n8|r®tj|d\|_}}ntd}tj|dd\|_}}|     d|›d|›d¡z| 
|¡Wnt k
rYnX|j r|j   |¡dS)    aVSets the character set and collation for the current connection
 
        This method sets the character set and collation to be used for
        the current connection. The charset argument can be either the
        name of a character set as a string, or the numerical equivalent
        as defined in constants.CharacterSet.
 
        When the collation is not given, the default will be looked up and
        used.
 
        For example, the following will set the collation for the latin1
        character set to latin1_general_ci:
 
           set_charset('latin1','latin1_general_ci')
 
        z+{} should be either integer, string or NoneNr¹z)collation should be either string or None)rºz SET NAMES 'z ' COLLATE 'r…)r’r¬r“rØr¡r!rÔr?rÚ_execute_queryZset_character_set_namer–r]Ú set_charset)rdr¹rºÚerr_msgÚ charset_nameZcollation_namerererfÚset_charset_collation&sR
üý
 
üý
üý üz-MySQLConnectionAbstract.set_charset_collationcCst |j¡dS)aReturns the collation for current connection
 
        This property returns the collation name of the current connection.
        The server is queried when the connection is active. If not connected,
        the configured collation name is returned.
 
        Returns a string.
        é)r!rÔr?rcrererfrºhs
z!MySQLConnectionAbstract.collationcCsdS)z<Gather information of the MySQL server before authenticationNrercrererfÚ _do_handshaketsz%MySQLConnectionAbstract._do_handshakecCsdS)z'Open the connection to the MySQL serverNrercrererfÚ_open_connectionxsz(MySQLConnectionAbstract._open_connectioncCsF| |j¡|j|_|jr"|j|_|jr0|j|_|jrB|     |j¡dS)z÷Executes commands after connection has been established
 
        This method executes commands after the connection has been
        established. Some setting like autocommit, character set, and SQL mode
        are set using this method.
        N)
r r?rBrrAr r@r rbrrcrererfÚ_post_connection|s z(MySQLConnectionAbstract._post_connectioncCsdS)z Disconnect from the MySQL serverNrercrererfÚ
disconnectŒsz"MySQLConnectionAbstract.disconnectzCallable[[], Any]rqcKs8|r|jf|Ž| ¡| ¡|jtj@s4| ¡dS)zÆConnect to the MySQL server
 
        This method sets up the connection to the MySQL server. If no
        arguments are given, it will use the already configured or default
        values.
        N)rér%r#r>r"ZCAN_HANDLE_EXPIRED_PASSWORDSr$)rdrµrererfÚconnect’s   zMySQLConnectionAbstract.connectrr)ÚattemptsÚdelayr6c
Cs”d}||kr|d}z | ¡| ¡| ¡r2WqWnHttfk
r|}z&||krld|›d|›}t|ƒ|‚W5d}~XYnX|dkrt|ƒqdS)a×Attempt to reconnect to the MySQL server
 
        The argument attempts should be the number of times a reconnect
        is tried. The delay argument is the number of seconds to wait between
        each retry.
 
        You may want to set the number of attempts higher and use delay when
        you expect the MySQL server to be down for maintenance or when you
        expect the network to be temporary unavailable.
 
        Raises InterfaceError on errors.
        rrz!Can not reconnect to MySQL after z  attempt(s): N)r%r&Ú is_connectedr%ÚIOErrorr&r )rdr'r(ÚcounterrëÚmsgrererfÚ    reconnect£s ÿz!MySQLConnectionAbstract.reconnectcCsdS)z;Reports whether the connection to MySQL Server is availableNrercrererfr)Âsz$MySQLConnectionAbstract.is_connectedF)r-r'r(r6cCsdS)z&Check availability of the MySQL serverNre)rdr-r'r(rererfÚpingÆszMySQLConnectionAbstract.pingcCsdS)zCommit current transactionNrercrererfÚcommitÊszMySQLConnectionAbstract.commitzOptional[bool]zOptional[type]z'MySQLCursorAbstract')ÚbufferedÚrawÚpreparedÚ cursor_classÚ
dictionaryÚ named_tupler6cCsdS)z!Instantiates and returns a cursorNre)rdr0r1r2r3r4r5rererfÚcursorÎs
zMySQLConnectionAbstract.cursorcCsdS)zExecute a queryNrerrererfrÚsz&MySQLConnectionAbstract._execute_querycCsdS)zRollback current transactionNrercrererfÚrollbackÞsz MySQLConnectionAbstract.rollback)Úconsistent_snapshotÚisolation_levelÚreadonlyr6cCsº|jrtdƒ‚|rZ| ¡ dd¡ ¡}ddddg}||krJtd|›d    ƒ‚| d
|›¡|d k    rœ|jd kr~td |j›dƒ‚|rˆd}nd}| d|›¡d}|r¬|d7}| |¡d S)aÒStart a transaction
 
        This method explicitly starts a transaction sending the
        START TRANSACTION statement to the MySQL server. You can optionally
        set whether there should be a consistent snapshot, which
        isolation level you need or which access mode i.e. READ ONLY or
        READ WRITE.
 
        For example, to start a transaction with isolation level SERIALIZABLE,
        you would do the following:
            >>> cnx = mysql.connector.connect(..)
            >>> cnx.start_transaction(isolation_level='SERIALIZABLE')
 
        Raises ProgrammingError when a transaction is already in progress
        and when ValueError when isolation_level specifies an Unknown
        level.
        zTransaction already in progressrú zREAD UNCOMMITTEDzREAD COMMITTEDzREPEATABLE READZ SERIALIZABLEzUnknown isolation level "ú"z SET TRANSACTION ISOLATION LEVEL N)éér=zMySQL server version z does not support this featurez    READ ONLYz
READ WRITEzSET TRANSACTION zSTART TRANSACTIONz WITH CONSISTENT SNAPSHOT)    rr)r˜rÛr™rØrrCr°)rdr8r9r:ÚlevelÚlevelsZ access_moderrererfÚstart_transactionâs2ü
 ÿz)MySQLConnectionAbstract.start_transactionzOptional[Dict[str, Any]])Úuser_variablesÚsession_variablesr6c    CsÒ| ¡stdƒ‚z | ¡Wn@ttfk
r\|jr@tdƒd‚| |j|j|j    |j
¡YnX|sf|rÎ|  ¡}|rš|  ¡D]\}}|  d|›d|›¡qz|rÆ|  ¡D]\}}|  d|›d|›¡q¦| ¡dS)aÇClears the current active session
 
        This method resets the session state, if the MySQL server is 5.7.3
        or later active session will be reset without re-authenticating.
        For other server versions session will be reset by re-authenticating.
 
        It is possible to provide a sequence of variables and their values to
        be set after clearing the session. This is possible for both user
        defined variables and session variables.
        This method takes two arguments user_variables and session_variables
        which are dictionaries.
 
        Raises OperationalError if not connected, InternalError if there are
        unread results and InterfaceError on errors.
        zMySQL Connection not availablezYReset session is not supported with compression for MySQL server version 5.7.2 or earlierNzSET @`z` = z SET SESSION `)r)r(Úcmd_reset_connectionr'ÚNotImplementedErrorr`Úcmd_change_userrFrGrHr?r6rÚÚexecuterq)rdrBrCÚcurrÄr}rererfÚ reset_sessions4 ÿýü
z%MySQLConnectionAbstract.reset_sessionzOptional[Type[MySQLConverter]])Ú    convclassr6cCsJ|r>t|tƒr>t |j¡d}||_|||jƒ|_|j|j_    nt
dƒ‚dS)z’
        Set the converter class to be used. This should be a class overloading
        methods and members of conversion.MySQLConverter.
        rzFConverter class should be a subclass of conversion.MySQLConverterBase.N) Ú
issubclassr$r!rr?r^rPr]r_Z str_fallbackrÖ)rdrJrrererfrÕLs ÿz+MySQLConnectionAbstract.set_converter_classú Optional[int]úOptional[List[DescriptionType]]z-Tuple[List[Any], Optional[Mapping[str, Any]]])ÚcountrÚcolumnsr1Ú    prep_stmtr6cCsdS)z)Get all rows returned by the MySQL serverNre)rdrNrrOr1rPrererfÚget_rows[s    z MySQLConnectionAbstract.get_rowszOptional[Mapping[str, Any]])r¯r6cCst‚dS)zChange the current databaseN©rE)rdr¯rererfÚ cmd_init_dbfsz#MySQLConnectionAbstract.cmd_init_db)rr1r0Ú raw_as_stringr6cCst‚dS)z Send a query to the MySQL serverNrR)rdrr1r0rTrererfr°jsz!MySQLConnectionAbstract.cmd_queryz(Generator[Mapping[str, Any], None, None])Ú
statementsr6cCst‚dS)z/Send one or more statements to the MySQL serverNrR)rdrUrererfÚcmd_query_itertsz&MySQLConnectionAbstract.cmd_query_iter)Úoptionsr6cCst‚dS)z,Send the Refresh command to the MySQL serverNrR)rdrWrererfÚ cmd_refreshzsz#MySQLConnectionAbstract.cmd_refreshcCst‚dS)z,Close the current connection with the serverNrRrcrererfÚcmd_quit~sz MySQLConnectionAbstract.cmd_quit)Ú shutdown_typer6cCst‚dS)zShut down the MySQL ServerNrR)rdrZrererfÚ cmd_shutdown‚sz$MySQLConnectionAbstract.cmd_shutdowncCst‚dS)z/Send the statistics command to the MySQL ServerNrRrcrererfÚcmd_statisticsˆsz&MySQLConnectionAbstract.cmd_statisticscCs tdƒ‚dS)akGet the process list of the MySQL Server
 
        This method is a placeholder to notify that the PROCESS_INFO command
        is not supported by raising the NotSupportedError. The command
        "SHOW PROCESSLIST" should be send using the cmd_query()-method or
        using the INFORMATION_SCHEMA database.
 
        Raises NotSupportedError exception
        z;Not implemented. Use SHOW PROCESSLIST or INFORMATION_SCHEMAN)r'rerererfÚcmd_process_infoŒs ÿz(MySQLConnectionAbstract.cmd_process_info)Ú    mysql_pidr6cCst‚dS)zKill a MySQL processNrR)rdr^rererfÚcmd_process_kill›sz(MySQLConnectionAbstract.cmd_process_killcCst‚dS)zSend the DEBUG commandNrRrcrererfÚ    cmd_debugŸsz!MySQLConnectionAbstract.cmd_debugcCst‚dS)zSend the PING commandNrRrcrererfÚcmd_ping£sz MySQLConnectionAbstract.cmd_pingr8r7)    r¼r¾r¯r¹Ú    password1Ú    password2Ú    password3Úoci_config_filer6c        Cst‚dS)z!Change the current logged in userNrR)    rdr¼r¾r¯r¹rbrcrdrerererfrF§s z'MySQLConnectionAbstract.cmd_change_user)Ú    statementr6cCst‚dS)zPrepare a MySQL statementNrR)rdrfrererfÚcmd_stmt_prepareµsz(MySQLConnectionAbstract.cmd_stmt_preparereú Sequence[Any])Ú statement_idÚdatarèrr6cCst‚dS)z"Execute a prepared MySQL statementNrR)rdrirjrèrrererfÚcmd_stmt_execute¹sz(MySQLConnectionAbstract.cmd_stmt_execute)rir6cCst‚dS)z%Deallocate a prepared MySQL statementNrR©rdrirererfÚcmd_stmt_closeÃsz&MySQLConnectionAbstract.cmd_stmt_closer)riÚparam_idrjr6cCst‚dS)zSend data for a columnNrR)rdrirnrjrererfÚcmd_stmt_send_long_dataÇsz/MySQLConnectionAbstract.cmd_stmt_send_long_datacCst‚dS)z3Reset data for prepared statement sent as long dataNrRrlrererfÚcmd_stmt_resetÍsz&MySQLConnectionAbstract.cmd_stmt_resetcCst‚dS)z2Resets the session state without re-authenticatingNrRrcrererfrDÑsz,MySQLConnectionAbstract.cmd_reset_connection)NN)T)NN)rr)Frr)NNNNNN)FNN)NN)NFNNN)FFF)N)r8r8r8r7r8r8r8r8)rerer)SÚ__name__Ú
__module__Ú __qualname__Ú__doc__rgrirsrtÚpropertyryrzr|r€rr¤r©rªr«r­r®rr¯Úsetterr±r´rérßÚ staticmethodrrrrrÎr    r r r r×rrr¶r·rr¹rr rºr"r#r$r%rqÚ__annotations__r&r-r)r.r/r6rr7rArIrÕrQrSr°rVrXrYr[r\r]r_r`rarFrgrkrmrorprDrerererfr3ŒsJ
=SRA
 ÿ
 
 
 
  ÿB  ù ü<ý0ú
û
ÿ÷ û
r3c@s¶eZdZdZddœdd„Zddœdd„Zdd    d
dd œd d „ZedPddddœdd„ƒZeddœdd„ƒZ    edQdddddœdd„ƒZ
eddddœdd „ƒZ ed!dœd"d#„ƒZ edRd%d&d'œd(d)„ƒZ eddœd*d+„ƒZddœd,d-„Zddd.œd/d0„ZdSdddd2œd3d4„ZdTddd6œd7d8„Zeed9dœd:d;„ƒƒZeed%dœd<d=„ƒƒZed>dœd?d@„ƒZedAdœdBdC„ƒZed%dœdDdE„ƒZdAdœdFdG„ZdHdœdIdJ„ZddddKœdLdM„ZddœdNdO„Zd1S)UÚMySQLCursorAbstractz˜Abstract cursor class
 
    Abstract class defining cursor class with method and members
    required by the Python Database API Specification v2.0.
    r4r5cCs:d|_d|_d|_d|_d|_d|_g|_g|_d|_dS)ZInitializationNr†rr)    Ú _descriptionÚ    _rowcountÚ_last_insert_idÚ    _warningsÚ_warning_countZ    _executedZ_executed_listZ_stored_resultsZ    arraysizercrererfrgÝszMySQLCursorAbstract.__init__cCs|SrhrercrererfriészMySQLCursorAbstract.__enter__rjrkr rlcCs | ¡dSrhrprrrererfrsìszMySQLCursorAbstract.__exit__rer“rhr )ÚprocnameÚargsr6cCsdS)aCalls a stored procedure with the given arguments
 
        The arguments will be set during this session, meaning
        they will be called like  _<procname>__arg<nr> where
        <nr> is an enumeration (+1) of the arguments.
 
        Coding Example:
          1) Defining the Stored Routine in MySQL:
          CREATE PROCEDURE multiply(IN pFac1 INT, IN pFac2 INT, OUT pProd INT)
          BEGIN
            SET pProd := pFac1 * pFac2;
          END
 
          2) Executing in Python:
          args = (5,5,0) # 0 is to hold pprod
          cursor.callproc('multiply', args)
          print(cursor.fetchone())
 
        Does not return a value, but a result set will be
        available when the CALL-statement execute successfully.
        Raises exceptions when something is wrong.
        Nre)rdrr€rererfÚcallprocôszMySQLCursorAbstract.callproccCsdS)zClose the cursor.Nrercrererfrq szMySQLCursorAbstract.closeFz$Union[Sequence[Any], Dict[str, Any]]ru)Ú    operationróÚmultir6cCsdS)a”Executes the given operation
 
        Executes the given operation substituting any markers with
        the given parameters.
 
        For example, getting all rows where id is 5:
          cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))
 
        The multi argument should be set to True when executing multiple
        statements in one operation. If not set and multiple results are
        found, an InterfaceError will be raised.
 
        If warnings where generated, and connection.get_warnings is True, then
        self._warnings will be a list containing these warnings.
 
        Returns an iterator when multi is True, otherwise None.
        Nre)rdr‚rórƒrererfrGszMySQLCursorAbstract.executez.Sequence[Union[Sequence[Any], Dict[str, Any]]])r‚Ú
seq_paramsr6cCsdS)aÇExecute the given operation multiple times
 
        The executemany() method will execute the operation iterating
        over the list of parameters in seq_params.
 
        Example: Inserting 3 new employees and their phone number
 
        data = [
            ('Jane','555-001'),
            ('Joe', '555-001'),
            ('John', '555-003')
            ]
        stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s')"
        cursor.executemany(stmt, data)
 
        INSERT statements are optimized by batching the data, that is
        using the MySQL multiple rows syntax.
 
        Results are discarded. If they are needed, consider looping over
        data using the execute() method.
        Nre)rdr‚r„rererfÚ executemany*szMySQLCursorAbstract.executemanyzOptional[Sequence[Any]]cCsdS)zQReturns next row of a query result set
 
        Returns a tuple or None.
        NrercrererfÚfetchoneDszMySQLCursorAbstract.fetchonerr¬zList[Sequence[Any]])Úsizer6cCsdS)a Returns the next set of rows of a query result, returning a
        list of tuples. When no more rows are available, it returns an
        empty list.
 
        The number of rows returned can be specified using the size argument,
        which defaults to one
        Nre)rdr‡rererfÚ    fetchmanyKszMySQLCursorAbstract.fetchmanycCsdS)zRReturns all rows of a query result set
 
        Returns a list of tuples.
        NrercrererfÚfetchallUszMySQLCursorAbstract.fetchallcCsdS©zNot Implemented.NrercrererfÚnextset\szMySQLCursorAbstract.nextset)Úsizesr6cCsdSrŠre)rdrŒrererfÚ setinputsizes_sz!MySQLCursorAbstract.setinputsizesN)r‡Úcolumnr6cCsdSrŠre)rdr‡rŽrererfÚ setoutputsizebsz!MySQLCursorAbstract.setoutputsizeT)Úfreer6cCsdS)zReset the cursor to defaultNre)rdrrererfÚreseteszMySQLCursorAbstract.resetrMcCs|jS)aÃReturns description of columns in a result
 
        This property returns a list of tuples describing the columns in
        in a result set. A tuple is described as follows::
 
                (column_name,
                 type,
                 None,
                 None,
                 None,
                 None,
                 null_ok,
                 column_flags)  # Addition to PEP-249 specs
 
        Returns a list of tuples.
        )rzrcrererfÚ descriptionhszMySQLCursorAbstract.descriptioncCs|jS)aReturns the number of rows produced or affected
 
        This property returns the number of rows produced by queries
        such as a SELECT, or affected rows when executing DML statements
        like INSERT or UPDATE.
 
        Note that for non-buffered cursors it is impossible to know the
        number of rows produced before having fetched them all. For those,
        the number of rows will be -1 right after execution, and
        incremented when fetching rows.
 
        Returns an integer.
        )r{rcrererfÚrowcountszMySQLCursorAbstract.rowcountrLcCs|jS)aReturns the value generated for an AUTO_INCREMENT column
 
        Returns the value generated for an AUTO_INCREMENT column by
        the previous INSERT or UPDATE statement or None when there is
        no such value available.
 
        Returns a long value or None.
        )r|rcrererfÚ    lastrowid‘s
zMySQLCursorAbstract.lastrowidzOptional[List[WarningType]]cCs|jS)zReturn warnings.©r}rcrererfÚwarningsszMySQLCursorAbstract.warningscCs|jS)z¸Returns the number of warnings
 
        This property returns the number of warnings generated by the
        previously executed operation.
 
        Returns an integer value.
        )r~rcrererfÚ warning_count¢s    z!MySQLCursorAbstract.warning_countcCs|jS)zReturns Warnings.r•rcrererfÚ fetchwarnings­sz!MySQLCursorAbstract.fetchwarningszOptional[List[Tuple[Any, Any]]]cCs(t|dƒr|jjSt|dƒr$|jjSdS)z&Get the added query attributes so far.Ú_cnxÚ _connectionN)Úhasattrr™r|ršrcrererfÚget_attributes±s
 
 
z"MySQLCursorAbstract.get_attributes)rxr}r6cCsnt|tƒstdƒ‚|dk    r4t|tƒs4td|›dƒ‚t|dƒrP|j ||f¡nt|dƒrj|j ||f¡dS)z$Add a query attribute and his value.z&Parameter `name` must be a string typeNzObject z$ cannot be converted to a MySQL typer™rš)r’r“r)ÚMYSQL_PY_TYPESr›r™r€rš)rdrxr}rererfÚ add_attribute¹s
 
ÿ
 
z!MySQLCursorAbstract.add_attributecCs.t|dƒr|j ¡nt|dƒr*|j ¡dS)z Remove all the query attributes.r™ršN)r›r™rršrcrererfÚclear_attributesÆs
 
z$MySQLCursorAbstract.clear_attributes)re)reF)r)N)T)rqrrrsrtrgrirsrrrqrGr…r†rˆr‰r‹rrr‘rur’r“r”r–r—r˜rœržrŸrerererfryÖsP ü     
 ry)QrtÚ
__future__rrãrwrüÚweakrefÚabcrrrrrrÚdecimalr    Úinspectr
r Útypesr Útypingr rrrrrrrrrrrr¥Ússlr›rÚ ImportErrorÚ    constantsrrrrrr r!r"Ú
conversionr#r$Úerrorsr%r&r'r(r)Z optionfilesr*r+r,r-r.r/r0r1ÚWeakValueDictionaryr2rxr r¨r§r¦rárúÚfloatr¬r“rr3ryrerererfÚ<module>sr     8(
 $
ÿÿÿÿÿ÷ T