ÿØÿà JFIF    ÿÛ „ !.%+&8&+/1555$;@;4?.451 4,$,44444444444414444444444444444444444444444444444444ÿÀ  á á" ÿÄ     ÿÄ ?    !1AQaq"2‘¡±ÁðBRbrÑá#‚’¢²3S CñÿÄ   ÿÄ !    !1QAa‘2ÿÚ   ? 5˜Z¯V¦cø)›t/? z¨±>Õ5€¶‹Á¤·¼z¼Ü¬+ñ®v¤¨_ˆR­BFn©—˜ý®ç̝P8gýt·ÉSTŦˆìät?þé¼íìN/Þa)ì–í6ô… Ï¿øÃj´¿KÇü]ÿ ªô¹-eKànëÕHTx}ýSÜ›ÿ ”7Ø×&µ<¦  ¥ÑO¶[Ù¯ä¨ÞÃÿ PZ-¬;#õ|•oaÿ ©CìÞz3˜öː/¤­ñTûIØ}š^ mÓ%ªxˆ¥ÉŸu=Z+ISe¿45™¼u;ú&WØ÷€æßQ™®{|íx*TC“#ZŠìZ§²‹ 6pv…³¿¡äª*áZÐ%ÒOáˆo"x«OHk w±æ+¬V(kMúŸ5Vö«$ ÁrÏbàb57/luR ¸ÑÛj Òµì`Мq­û žICÀÊ•©4€Âcà¨Ï€O´<èÐ:›ù(Ë^L8þ‘ÍÌ#¸Ð_Ì©ÙK(Öz 4¬û+¸;ü’V’84‘¬ÃŽ:[â‡ÔÌáõp¢~§ªlæ£ö{®G>J¼"°‡7¯ÆÉèßû ‹É‹§ÁòÃýâßî ^ƾÙõ‹×óH#«LP½ïX=xÑÍ$|W?•~• îëÔ©ª‹ {ÝT…Kÿ ”hûâá)J*ö˜–ÔU;iÇ€/ ÆþjóZ\ýwØ=Ìm ºèËL9 ýèÆð/¨’¥öo=nË.%Îì ŽÕ¯È|{Oj²ƒE6e/ßdÄõ²Ìâ1O®ò×TsəԸhOMýíMˆ¿¼H˜l²,7Â¥#MF/Úf°Ö½± ¸–dr‹NýÊ íjqx{œÉ ä-È ¦ øÄër¨q°ð †nцýÑÄÆ’mä…n<0È™;ÁÝá¯ÁZƒ7FÀmì­ É&9ˆîéi¶ùN§Y• ÃZãAâ?•‡©‰ , ó¾IŸŠc1 4â&y­&pŠ­6;M À 0¹qç»p.á …ŸÅáK@%6·y6ƒ‰3?”úºŽ‰éX5ªPT §µ!=Mž«Ú½‹ÅgÂSâÉaþÓoö–¯ÁÔìR>5éÿ üs¶ÆUcÌ kÇR ]ÿ ù¬¼«VŽ;Â|‡~¢¦”ÏŰæ {L™Õ°Óv¹ò¸írޡעCÃ!íVÕ {¶»sŒNPg/ "uÕbkm²“$ďå¿é¹§°½æz¯6 †s¿!s–wÚÝ“™Œ °.ûj>·+™Òa…©Œ&rÝÎtÛë긪Ît’LAVp%c Úý[ÄzJ¾ÇàXXç@˜ó<êL]·T˜¾¥1Ó©V‡g´æ½¦Ý@¹óø!_@´ÞâSÁ —S3™•& ]@JHÚý©ZŽ €×æÔr»Áf!‡yÞ4Mv*èÓã_{‘åóUuљØ«Oïé*®EvÑ Œ÷‡U \"㪒ÍK+À 4“M¡ï:0¥5í!'<@î´”>Ç»&Z–ïCCV˜Ì5Šo&îhè.žû |ÓK©h$s6KìŒëã)¹hI¦GïOåóI;ììü#É$Š0…Ææ¥TØ.5­¾gn´ “ÂÖ\:hœ89G)J@„}œ:’Ò{/Š"¦_Æ×7Æ3VÇŠÊa]ÚŒÙ€Ä–=®uÁßâACZƒ§§£ Qnâ:«,×{tyø¬iÛcœÜÄ€H½ÄÍCk´÷šß .W'b¤Íåh]÷€=,Žv×cÚEÚHXJX¶îo¨FÒtèöŸ>ªª6[J®Fµ£sGÁeqõfe\íjÒÐïÄÐGˆe1Ø‹.Ø”‘Ëuø Y­ˆÜ ŽG|zùªüMpDnQWÄ”%JŠ™)â*p@Örš«ÕT2Ð%ˆG#ª„ ·¤!°ŸOTÂT¸aÚ%4&h™LµšØüÐ.F¿²ÐÞ_Ç‚¾ÅÃaÜ÷09Æ q€öy˜v‡85õN÷]¬äѼóS{°_MެúÔ#°Ç¸0åÞè2ëôPcvÆw9®ií1Ä8F™˜à‰´+‰Ik1òÝ7“Ñ×ÒsÝ\x‚h`ÞÑ`ó"|µEcý£n˜h`}GÞ !±ù²Ápü²ß6 0ïi󜵩SÈÇ7˜-ÕURO˜¦´f$ªž-Í6(œ}<„ éc øs]ŽŽ„*—¾ ìdŽ„)méª\¿êÎIg¾ØÞ~I#C/¼¼´EÁÈŽi8“©õådô·>euä ƒ'Ê×लR1ÉJE1ÐAát`t;ÇР%Ý<‡¥„ÍÆ`×Oyó)õiI€ñQaŸ4Ûù\áàaÃÔ¹HÃu¹*k€¦<„e S‡&õÏ B!ŽhüÞ`yj}mªf×\¿ Ç~æ­9‡û\՞Ǖg²1Žû5V7 !àöšm° c`ܬøÇìµÒ'P"?…´Ö,"§^•õލsÔ)6˜sæéÍR¼ ò|Sl”‹7 nPW Gòú÷½§O¯‡„l¡kSÞŒr½PÊ@æ¢pŽ-mÿ #Ÿ˜Àº¶Áä¦;ïÔæ$1££`“Õ>„—·ž)ßð³ñ#Ï Ô$¶œ‰ÊE‹À;÷º ¯«P:Ñ”8–IÊtpÞ3ª“>ê“þës4ò2OÏÕ­±zô†Õ§‰.÷ä¸;¿˜“'œ›žª}«Œ{ª±Ì 9ÔóÞÕ‡0 $íWV3Üì¬ —@kÝ4@¿r¼±½¬™›?øØæ´'Áé®CË3-g$˜ö‡×auÚi´Žp/êÛ æF›Ú2v‹ã¿¿,nB1̨ƃqÞa5͝@&Æû“él÷ \C²½UÍc ¯k×¢U ÖéQå™—-r wô ÞÏ<Ò=&=ÿ Ôê Òêˈt,i—;LîÜ á¸*ÚÃ1$êL•LÍ <É)ýÐà’ ;F™{ƒ™˜€&'}‚ãÄK`¡ÞT@I;®žZóè‚s’7®°›+§O­Åq©é»²9<Ô J ¼9O’HL»Ùïì¸rk¼Ž_ý‘TŸu[²ßÚŒ·ü÷B%¯E ŸÔX5êO´ Ç•€’I0 ÉJX` ñ¹õ%;µŸD‘«´€àwÒ™U ûئžÖö\×®×´8 ½‡ºÐÆÓ§?Àkmœ=;d5*@-ì0F Rªýš[Ü6âö̃ڸr*KA9· u*µæ£?U¸Âêí†8@¦X4 e-ò„0s{ HâUpU?¼mñRa°®a%Ð'tÉ×’\¾ÊÉ]t›h>·(Ë@R¼¡Ãt h}’O÷au<+nT…Ö…MӐ??Óe95 q>í/;&JSû °¯ÊéÞ øƒ*Ã2½Ài&:nôUl=¾¿5eˆ3”ñc|Ú2V”>„»&eE;«ÚäC p¢Û úy 9š[ŒÌx¼擼A&DåÒ¯ˆ¤ÀÌ;"˜ ÏQä¸åhÊ}Ûq«Û0WžÒ|»€ø®öCm5•\ÇÀ§Pe3£]0ÃàLDÉ‰1øªxjgwT‚÷¿LΨK‹›ùs—xˆÜ±µ kæ¸f‰‰ÜGk/LÛØ6d9ò¶ùA{ƒA3š/¬D¬khÓk‰`˜"㯒r¿±Óã jx‡°e}<Ñø\3y:'À•/h½Í€Ç4~g ?Û(¼]v‘ªlKÎâ~?O‚W%{Ì:“'©úNq¾›úo(X’¥¯ˆ nFê{Ç€ü?º'ë ø‹ì Þ09ŒÌç9Æ —ËC`j@ÓÄ(+a‹un¸#ÂꟋ{K`‘ÑÍÍ'à´»/Û,KW;Þ4²þð ï Nm|~fGÏ(…³Ã)«1ö­Õ ¥‡¨©ƒÃ™ü-s=à=U66Ï«Ýc蓦W¹íž®›nÔ%êÇìŒ<#Ü×84ån®Ð ÒåOC` ñânÑs‡¢ç 1õ%Îhì½Ã½® e:ݼUZo™`  ÅZŸŒÊ«ê1ÏÄo$q¹Þ€©ˆhÐÉä¯ñ[!…Ú˜àJ:x2$Íß&PåT£6ç— ‡Í*4Ýšçjÿ ‰É nófÐ ó(L5C•åÆ\rMÒ@ò }y-W}™üýVù—ú¢=Ù”c®‘< M ž ´Phr ¦©TD ‘ù.$´÷O‡‘V2Æò.=IUŒ=ž‡â¬i™aþÓåÙ?òUø'ØÖ•.~* šTŒ!•-×áºTâ®ä#õü'´ eýlYÅÓeÕKÂrT"CÚ@u!Óxƒ{š3€}1¿(r}%«nËamjÑ%ÑNEò v ˜à  σöK³,*º.àzù¨™Ó ÚçâU¦*¿ 9{%Ö¹ njûdaXöb) kÛÆ±ûÓ\°M7ˆÂ=û›ç¿Ã‚­V»Cg–8ÙêE- j)k$º`Ã-ùEýeBÆÇ]c¡°ñty&Òd0nõ'¡W+ƒ*|–øµFa\GQªEAÔp5\Ǽ·¼Ç8·õ -â§Ú[ ‡ uZeÖ 3}×d'+¹:ð+K†Û®s!Ï$úe€<Û”x)1»a­¡LC]¸µík…ÚàA»AYº{†ªS[¦5HÒ7ù --,ísòDØ€èk ÞÀîÜ ò@â( ËNˆë›4ô½•/¦o‡€Û7 ê•ÆêòðÜy'Án½µ á˜ݦ ndeo…[ì¶Ê,¥R³Ä=À±—–ß;£™´ñSâ*g§”ïaið‘Jå~™ÓÞ ß³Õ¢»8x埒²52>AÊb&-÷\7´éÄù€T˜,w;3{ï˜k…à¹ÄqÀ«œ{€\ ˆ¾[´¨јr &Úé„Ívˆ±8†¿]|¬ņ4I×pÞS1ÈÖz‰#Ìv‡G!YNògñ:màTz¢Ý1ô©^O=~ë|5Bã™ç•¼µõ•bÆ@úÕS¬ÈŒ#¬zünrŸ û” Z²•èðV"ÁHÚý©wÝ €7¼Ìu1hÑa3Éä û f$o¿É ™Ú›ÝçnpÒ3äÌ3†Í§,Äï]$‰/pê †«À¼¸e9­Æê_C]žƒ·ý·frÁN«, E=›Çq -‰öŒ:aÏ¿±í&£Í:-} 84‘ÿ eƒQÑeëSsuiA ³g㟥ú£?ÿ ʼn*”“÷aühe:ÊWa@ÒÞk±eØ] F Ô—r.åä˜ @ö¥ªZoÐýYL·¥S²G/‡ñ <~*ZÆ´è>JlòàÛÆ½ÿ 窘ìGN¢:I®KšJp/`íIÁÀõ#Ä-€ö­šµŒoF4|ÆQØÆ@Ì|£Ô…¢À{9˜è½Üó›€ôYÒÎYsið;ís¤€à²ˆ‚4qÉVŒI$ ‰"° æµ8cXGjœˏ¡Aâý•ËÜ¢ûï e·çLx']á"oÅÎê3¯Ç—¹”ó0nå‚âg{Œñ> S´˜îè°g238‚ãköÝfÚd´6Ò€;ò÷±¢™¼›º ¢Æ'¥Ðx'e¬ç ]bÈÆV¢ó‹kýBO ðÊâ$Ÿ!×T 3Mýמ žìٍàÌü‘8÷€àæØ8æ©6‰©L´«…oãpð„~Çk‰!ñ;‹”ÛžÍ àž±z Ÿôû øŸÝužÏ;ÿ #|u6™Þ¬ÚˆÐõA4¶â|ôl|Ê2ŽÇ¤ÝÅÇY.<#Aí.k§hóF‚”Y; M½Ö4hŸ4&›­¿tès´%FìL¥£Ãk‰ÇT¤haÁ¤ÚxfÉ`ÑìË›>i 3t‚:,–+^÷´–{Û–Nxi"x‘Ûg î¨>¥Õ܁ùZH,2Û“:8xÊ¢Çí9.É-Ìâã-=çjwµS˜dütžçwýGòú®®ûº_ˆýx$–¡ãøO EÚÛÏ÷R„×w+3£Á£öUMyR²¹âŒ°š›¸Ñãò9§Ó_Dl+Ùßc›úšGÅÌc†Ž!Ko=¶.‘Îÿ c²(2®V mª.ÿ ¹B›¹å ù„öŸSV>™ü¯$y:G¢Z×àøúdî¹û­·ýÇ´:•c LÍõi_‹ö+ÎæGÊè>OŠ•äž´§Þ{X}¨1ÚTc›»Qþ•êô°t¿OP?eæ~É{5]•ÙR£r5†nZ\ã@ &îJõ ¾àC°þV>fé¥/ü5ñÊIº_é5 ;e­h<@ Ä&æÃëE%;X,ÒãÆÞ`Oò¦kŸm#˜!ÀyÄ¢| óLšò¥Ä` ¶R=|ÈCâh5ò3DˆïF†ðÒ#ÅìÛœ?¸yhBãœí ZxßÎÄhºRK„`Þödvײ™ÀÈÑÒgŒuY w³%†ƒÓzõ ÖÏp‚dH®¦A´ù§»ÓÇMæ~)ˆð‡û:ù&Ä •vGD´À n ݇¼Ö8Fö óáà£~Ë¥x`oK|Ä?fxiØü%pìR>éò+Û±éÎ>núlFŤ'tq8LZÏvÃ?„¡ß±È⽆¯³íü@x|PöUäèØã¡ð‚ŒAìÏ"vÍwóŸÍ{ ý0.z È•Ö{,N¡£¡ŸKÕÙž>Ýœþ ÍÀ°<×EA!Å‚D™IúOÍ¡>ôG}Â` ÍßkÜL™Ž Þð™ {IøF²¹òQ3&!ÃÂÞz.d&Ï-sH¸,Ôõ˜ŽP€ 77ˆÝ¼ÊëÜw =cÕ Ú,ØÐ5ÎYÐ)ì´öœgŒ[¤ßv㙑8心>h]§µháYš£²ºÑ.{Ï7Sð•?´~×SÃKýJÛ˜ ™Íäiúu<µX¶1õ^kâçIÑ£sZ4h>j*ÔšD:4­¿_ ÷¸ Õxæÿ ¸?Mù _•­ÊÐ ä ÷ý ÑwL œ­ïnTkÛUÍN©ë:¦fV ¶ÜÔÜMªÅâA½–¿R×TXš-%iTÊT•‡Ù‚JôϐZxWÑè‰f‰òG º ×Õû2aZ7OU3[“×AT–ÞŒ…-‘¤”Ì ì&(ˆ¿­•ƒkï’:ðY¦W‘ Å)“†‘˜³Åtcø˜ñTÂwÚÇ4|üLÇªí–v- qˆèU qPE.†â‘˜µ Æ,ÐÅs]8¾„oúÑ i>ÜxxÈó)ƒ ´æÁâØ$À‰vžŸf$Ž |ãw;ÀÁIJ»b` {¦Ó¤Ú$©YÀ‘n@Óïž«9J¼êG m¤ ܯ¹ÌW4€ÐÒÅÛ‡#褕Ÿn-?í|с¥÷Ú¹¬'´ÞÜ9ÓK `hê£SÄSà?7—Wí_´…óB›»:=Ãïq`<8ñÓŒÑlú2d¬ê³£hÖ[l|$vÝro~'R®‰§°ñmY ͧäP |PUª¹·:3Œ[Û{Xÿ ºâ@‚W–Äé u‚ ¯´*=íή.pûÒdt @G‰¬ s¸ ëÉücr ÞæÑ¨Ê@>¤¢Ö±. Þ'¯°ÌME[YéïĵÂCå½ Ué©Áû'Ê9%eÔðNU”ë‘ÌsD3/®+UI˜9h.WC”빓$#:pz:YÓ ¿xž* ³$Í +$kñAŠ‹†¢ Uê>¸)_š¬÷©ßAÂÔb9ÇU ¯¾á•9¯ÏÏ÷O÷¼¼Fähal1‰3Ì[Ïr•´UCksNÐ] R‘¸¥H+§Šé†c©vÖÞ0iÓ76s†î!§=ß ¼~Ô'°Ãmäoäš³ªøi1úÉ)³yV8 CLÄØÁ‘WYïi€H6ÖÑiámø^ÈY´°Ñ7¥Û*—Ñ©L«Qƒï—Ùrÿ ›£Ð*š¸ˆL©ˆ$ˆ ÷¾D§9È®«qbqC)–ˆïv´çñsÑVT­Ø, <àïºÀO«Jý·õ àfPìð .wFšir´þ’2_Y *Æ€x\« ì€9š@ Ž|F⇥ˆkZ@hÖÄ0t¿-<“‹qµ¾*ZL¤Ú)&BJpÓF5=$„at*Zš$’ÑtdûÝRI1 2މ$€$I$#‰SÞ’Hë¬ï;Á$¡t$’`<(ñÇt)$‡Ð.Êf¢X’Kt=Éé$‚ˆªè¢oÝëòI%Rgcª÷ŠyI%¡‰ÿ !ñ)´õ $¤ Ô’IIGÿÙ  j@ dZddlmZddlZddlZddlZddlmZmZddl m Z m Z m Z m Z ddl mZddlmZddl mZdd lmZdd lmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%d Z& ddl'Z'e(e'd re'jRrd Z&ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5ddl6m7Z7m8Z8ddl9m:Z:m;Z;mZ>ddl?m@Z@mAZAmBZBmCZCeCr ddlDmEZEmFZFmGZGmHZHddlImJZJddlKmLZLddlMmNZNmOZOddlmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZddl[m\Z\m]Z]dZ^dZ_dZ`dZadZbdZceede e eeefege e f ZhGdd e\ZiGd!d"eZjGd#d$eZky#e*$rYwxYw)%z+Module gathering all abstract base classes.) annotationsN)ABCabstractmethod)datedatetimetime timedelta)Decimal) signature)sleep) TracebackType)AnyBinaryIOCallableClassVarDequeDict GeneratorIteratorListMappingNoReturnOptionalSequenceTupleTypeUnioncastF HAS_TLSv1_3T) CONN_ATTRS_DNDEFAULT_CONFIGURATIONDEPRECATED_METHOD_WARNINGMYSQL_DEFAULT_CHARSET_ID_57MYSQL_DEFAULT_CHARSET_ID_80OPENSSL_CS_NAMESTLS_CIPHER_SUITES TLS_VERSIONS CharacterSet ClientFlag)MySQLConverterMySQLConverterBase) DatabaseErrorErrorInterfaceErrorNotSupportedErrorProgrammingError)CONNECTION_SPAN_NAMEOPTION_CNX_SPANOPTION_CNX_TRACER OTEL_ENABLED)end_spanrecord_exception_eventset_connection_span_attrstrace) deprecated)read_option_files)UNACCEPTABLE_TLS_CIPHERSUITESUNACCEPTABLE_TLS_VERSIONS) BinaryProtocolTypeCextEofPacketTypeDescriptionType EofPacketType HandShakeTypeMySQLConvertibleTypeMySQLScriptPartition RowItemTypeRowType StrOrBytes WarningType)GenericWrapper import_objectzVThe '{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.z`Option "openid_token_file" {error}, it must be a string in the form "path/to/openid/token/file".ceZdZdZy)CMySQLPrepStmtaPStructure to represent a result from `CMySQLConnection.cmd_stmt_prepare`. It can be used consistently as a type hint. `_mysql_connector.MySQLPrepStmt` isn't available when the C-ext isn't built. In this regard, `CmdStmtPrepareResult` acts as a proxy/wrapper entity for a `_mysql_connector.MySQLPrepStmt` instance. N)__name__ __module__ __qualname____doc__J/opt/nydus/tmp/pip-target-mjwu0ny1/lib/python/mysql/connector/abstracts.pyrLrLsrRrLch eZdZUdZdqdZdrdZ dsdZdrdZedtdZ edtdZ edudZ dvd Z dwd Z dqd Zdqd Zdqd ZedxdZedxdZedydZedzdZeedxdZej.d{dZedtdZej.d|dZed}dZej.d~dZddZdqdZe d ddZeddZee jBdddZ"ee jBddzd Z#edd!Z$edzd"Z%eedtd#Z&ee jBd$dd%Z'edyd&Z(e(j.dd'Z(dd(Z)dd)Z*edxd*Z+e+j.d{d+Z+edxd,Z,e,j.dd-Z,edd.Z- d dd0Z.ee jBd1dd|d2Z/edtd3Z0e0j.ed|d4Z0edtd5Z1e1j.d|d6Z1edtd7Z2e2j.d|d8Z2edtd9Z3e3j.d|d:Z3edtd;Z4e4j.d|d<Z4edxd=Z5edxd>Z6edyd?Z7edyd@Z8e8j.ddAZ8edxdBZ9 d ddCZ:eddDZ;e;j.ddEZ;eddFZedqdJZ?dqdKZ@edqdLZAeAZBdMeCdN<ddOZDdddPZEedtdQZFedddRZGedqdSZHe d ddTZIeddUZJedqdVZK d ddWZLe d ddXZMee jBdYddZZNedd[ZOeOj.dd\ZOe d dd]ZPe d dd^ZQedd_ZRe d dd`ZSe ddaZTeddbZUeddcZVeddddZWeddeZXeddfZYeddgZZeddhZ[eddiZ\e d ddjZ]e ddkZ^e d ddlZ_e ddmZ`e ddnZae ddoZbedtdpZcy/)MySQLConnectionAbstractz8Abstract class for classes connecting to a MySQL server.cd|_ d|_d|_d|_t j |_d|_d|_d|_ d|_ d|_ i|_ d|_ d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_t2d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#t2d |_$t2d |_%t2d |_&d|_'d|_(d|_)d|_*d|_+t2d |_,t2d |_-d|_.i|_/d|_0d|_1d|_2d|_3d|_4d|_5d|_6d|_7d|_8d|_9tu|_;d|_< d|_=y) InitializeNTFz 127.0.0.1i r ssl_disabledconnect_timeout read_timeout write_timeoutallow_local_infileallow_local_infile_in_path)>$_MySQLConnectionAbstract__charset_id_tracer_spanotel_context_propagationr* get_default _client_flags _sql_mode _time_zone _autocommit_server_version _handshake _conn_attrs_user _password _password1 _password2 _password3 _database_host_port _unix_socket _client_host _client_port_sslr" _ssl_disabled _force_ipv6_oci_config_file_oci_config_profile_webauthn_callback_krb_service_principal_openid_token_file _use_unicode _get_warnings_raise_on_warnings_connection_timeout _read_timeout_write_timeout _buffered_unread_result_have_next_result_raw_in_transaction_allow_local_infile_allow_local_infile_in_path_prepared_statements _query_attrs _ssl_active _auth_plugin_auth_plugin_class_pool_config_version converter_converter_class_converter_str_fallback _compress_consume_results _init_commandr)_character_set_local_infile_filenames_queryselfs rS__init__z MySQLConnectionAbstract.__init__s,0 !  .2%","8"8":(,)-!&:>37+-  !!! %  +/!#!"FH #8#H!&/326 OS59#15"&#((-2G 3  -B.,Q-B?-S$$)', %*)>?S)T :O (; (*.!;=!&+/15)-!37@D-2$$&+,0,8N=A$ ((, (rRc|SNrQrs rS __enter__z!MySQLConnectionAbstract.__enter__  rRc$|jyrcloserexc_type exc_value tracebacks rS__exit__z MySQLConnectionAbstract.__exit__ rRc|S)zReturns self for `weakref.proxy`. This method is used when the original object is needed when using `weakref.proxy`. rQrs rSget_selfz MySQLConnectionAbstract.get_selfs  rRcd|jxs#|jduxrtjdk(S)z)Returns `True` if is a secure connection.Nposix)rrsosnamers rS is_securez!MySQLConnectionAbstract.is_secure s3   T ) @bgg.@ rRc|jS)zReturns If have next result.)rrs rShave_next_resultz(MySQLConnectionAbstract.have_next_result's%%%rRcHt|jjS)zReturns query attributes list.)listritemsrs rS query_attrsz#MySQLConnectionAbstract.query_attrs,sD%%++-..rRcJ|\}}||jvr||j|<yy)aAdds element to the query attributes list on the connector's side. If an element in the query attributes list already matches the attribute name provided, the new element will NOT be added. Args: value: key-value as a 2-tuple. Nr)rvalue attr_name attr_values rSquery_attrs_appendz*MySQLConnectionAbstract.query_attrs_append1s1!& : D-- -+5D  i ( .rRc:|jj|dS)zRemoves element by name from the query attributes list on the connector's side. If no match, `None` is returned, else the corresponding value is returned. Args: name: key name. N)rpoprrs rSquery_attrs_removez*MySQLConnectionAbstract.query_attrs_remove>s  $$T400rRci|_y)z5Clears query attributes list on the connector's side.Nrrs rSquery_attrs_clearz)MySQLConnectionAbstract.query_attrs_clearHs rRcg}|jd}t|tr|jdr|j dst d|d|ddj d}|s t d |D]4}|jj}|s$|j|6n8t|ttfr|Dcgc]}|s| }}nt d |d|jjd d  td d n|jd d d }|jd |d}ggg}i}g} td tj|dzD]2} |j!t"| | j%t&| 4|D]} d| vr9| | vr5| t&dvr|dj| +|dj| @| |vrd|| } | |vr t t(j+d| | t"dvr|dj|| |dj|| t d| d|ds|ds t d|dD]*} | t,dj/vst1d| d|dD]*} | t,dj/vst1d| ddj3|ddj3|dg|jd<y cc}w)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' listzItls_ciphersuites should be a list with one or more ciphersuites. Found: ' tls_versionsNT)reverser-TLSv1.3rrz The value 'z1' in tls_ciphersuites is not a valid cipher suitez:No valid cipher suite found in the 'tls_ciphersuites' listzTLSv1.2zCipher z( when used with TLSv1.2 is unacceptable.z( when used with TLSv1.3 is unacceptable.:)rv isinstancestr startswithendswithAttributeErrorsplitstripupperappendrsetgetr(sortindexupdater'extendr&DUPLICATED_IN_LIST_ERRORformatr<valuesr0join)rrtls_cstls_css_tls_csr newer_tls_vertranslated_namesiani_cipher_suites_namesossl_cipher_suites_namestls_verrtranslated_namecipher_as_ossls rS_validate_tls_ciphersuitesz2MySQLConnectionAbstract._validate_tls_ciphersuitesLs-. fc "%%c*vs/C$?xqIQrl((-G$L# ,,...0$++G4# s ,5;FV6vV F ))/3 yy}}^T2: O>*1-  $'$Q .0H#% .0 $$Kl&8&8&G!&KLG $ + +,=g,F G $ + +, L  /q1N!>y!I!P!P!RR'n--UV2 /q1N!>y!I!P!P!RR'n--UV2 HH%a( ) HH%a( ))  $%K Gs K9K9cg}|jd}t|tr|jdr|j dst d|d|ddj d}|D]M}|j}|d k(r||vr t tjd| |j|O|d gk(rtst tj|tt|trJ|s t d |D]7}||vr t tjd| |j|9nNt|tr|D]}|j|n%t d dj!td|d|s t dg}g}g}|D]F}|tvr|j||t"vr|j|6|j|H|r?|d gk(r)ts#t%tj|t||jd<y|r#t%t&j|t|r#t t(jty)z"Validates the tls_versions option.rrrz%tls_versions must be a list, found: 'rr rrrXrrzJAt 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)rvrrrrrrrrrrTLS_V1_3_SUPPORTEDTLS_VER_NO_SUPPORTEDr(rrrr=r0TLS_VERSION_UNACCEPTABLE_ERRORTLS_VERSION_ERROR)rr tls_versiontls_versruse_tls_versionsunacceptable_tls_versionsinvalid_tls_versionss rS_validate_tls_versionsz.MySQLConnectionAbstract._validate_tls_versionss ii/ k3 '**3/K4H4H4M$;K=J#1R(..s3H#%mmo "$,.(077!/{8 ##K0$I;&/A$(// \J T *$*'l*(077!/w8 ##G,' S )&##G,'!ii -.jaI   C  $&!!#G,& ''033)009$++G4 $ I;.7I'(// \J)9DIIn % &#.55-|  " !2!9!9't(j*j/|rt(j*j1|rt(j*j3|r t5d |j$s |j&rtj6g|_ ntj6 g|_ |d sd |_nd|_ |d|_|d=|j:dk(rt=d|j:d |d|_gd}|D]\}} ||vr||||<||=d|vsd|vr$ |d} |d= |d} |d=|jG| | d|vr|dr |d|_$ tK|d|_&|d=d|vr|jd|_(d|vr |d|_)|d=d } |jUD]\} } t"| | jWdr0d} |jXj[| j]dd| iQ| jWdr d} |jXj[| | id | z} t_||| ja|jbrt(jdd!k(rd|_(|jPr4|j:d"k(r t=d#|j:d$k(r t=d%| rrd&|jXvrt"d'|jXd&<d(|jXvrt"d)|jXd(<d*|jXvs|jXd*d|jXd*<tgd+|jXvtgd,|jXvk7r t5d-tid.ti|jXksd|jXd+<d|jXd,<n.|jXd+du|jXd,duk7r t5d/|jXj!d0|jk|jXj!d1|jm|jni|_7ntq|jntrs t=d2|jnjUD]\}}|ttvrtq|tvst=d3|d4|jndty|d5kDrt=d6|d7|jWd r t=d8tq|tvst=d9|d:|d;ty|d|vry|d>ttq|d>tvs t=d?|d>j}|d@k(r&t(jddAk7r t=dBdC|_An|dDk(rdE|_An t=dFdG|vr|dG|dG|_Btq|jtvst=tjdHI|jdk(rt=tjdJIdK|jvrt=tjdLI|jr|jdM|jdN|j!dO|dO|_Gtq|jtvst=tjdHI|jdk(rt=tjdPIt(j*j/|jst=dQ|jdR|j!dS>|dS|_Itq|jtJr|jdTkr t=dU|j!dV?|dV|_Jtq|jtJr|jdTkr t=dWyy#t$rYwxYw#t$rYwxYw#t$rYwxYw#t$rYwxYw#t$r d |_YwxYw#t$r d|_YwxYw#t$rYt@$r}t5d|d}~wwxYw#t$rYwxYw#t$r|jB} YwxYw#t$r|jD} YwxYw#t$rYtN$r}t=d|d}~wwxYw#t$rt5d| ddwxYw#t4$rt_||| YwxYw)YaConfigures the MySQL Connection. This method allows you to configure the `MySQLConnection` instance after it has been instantiated. Args: **kwargs: For a complete list of possible arguments, see [1]. Raises: AttributeError: When provided unsupported connection arguments. InterfaceError: When the provided connection argument is invalid. References: [1]: https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html Ndsnz!Data source name is not supported get_warningsraise_on_warnings client_flagscompressTr]r^z.allow_local_infile_in_path must be a directoryconsume_resultsF auth_pluginrXauthentication_webauthn_clientrz5' cannot be used as the default authentication pluginconverter_classzEConverter class should be a subclass of conversion.MySQLConverterBase))dbr)usernamer)passwdpassword)rZconnection_timeout)read_default_file option_filesrrhostportz'TCP/IP port number should be an integerrY init_commandzUnsupported argument 'ssl_tls__rmysql_clear_passwordzEClear password authentication is not supported over insecure channels$authentication_openid_connect_clientzEOpenID Connect authentication is not supported over insecure channels verify_certssl_verify_certverify_identityssl_verify_identitycakeycertz:ssl_key and ssl_cert need to be both specified, or neither)r0r1z4ssl_key and ssl_cert need to be both set, or neitherrrzconn_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 sizekerberos_auth_modez('kerberos_auth_mode' must be of type strsspintz6'kerberos_auth_mode=SSPI' is only available on WindowsMySQLSSPIKerberosAuthPlugingssapiMySQLKerberosAuthPluginz@Invalid 'kerberos_auth_mode' mode. Please use 'SSPI' or 'GSSAPI'krb_service_principalzis not a string)errorzcan not be an empty string/zis incorrectly formattedwebauth_callbackr openid_token_filezcannot be an empty stringz The path 'z1' provided via 'openid_token_file' does not existr[rz.Option read_timeout must be a positive integerr\z/Option write_timeout must be a positive integerrQ)Krr3rar4r`copyr0r;rKeyErrorrr*rcrrCOMPRESSrr"rrrpathabspathexistsisdirislinkr LOCAL_FILESrrr/r TypeErrorrkrl set_loginrqintrr ValueErrorrwrrrrvrreplacesetattrrrsrr rrrrjrdictr!rlenrd CONNECT_ARGS_add_default_conn_attrslowerrr|KRB_SERVICE_PRINCIPAL_ERRORrr{_validate_callabler}OPENID_TOKEN_FILE_ERRORrr)rkwargsconfigdefaultinfile_in_patherr compat_mapcompat translaterr set_ssl_flagr0r attributerrr3s rSrVzMySQLConnectionAbstract.config/s "ZZ6 zz"3T:  F?#$GH H#,V,  &~ 6D ~& %+,?%@D "*+   ,,.G &~ 6 A'D ~& j!!%%/%8%8$9!$*:: "78L"M$  ,2:: ( !"> ?, (  + +WW__T-M-MNNGGNN>2 n577>>.1$%UVV  # #t'G'G!+!7!7 8D ","8"8!8 9D  *+,(-%(,%  # &} 5D }%    @ @ D%%&'   #)*;#9#' % $( &!))E"d* &0AT0IJ$Jyy}}^,8++-yy}}/0<//1    #!D D,,d3 !BC C)-)9)9)?)?)A% : -!)S1(%;fT-=-=,>aA y>B&(*9+5WX'',(4 "*c2(%i[ :,G++ z?T)(%i[ :,G==9*BB    7 7 7  ( ( * 6 )f5I.J.Vf%9:C@$%OPP!'(>$"9"9:$ !8!8 9:%% ::n % 1!'!7D d00#6$:L:Lq:P$%UVV ::o & 2"("9D d11374;N;NQR;R$%VWW> *   U !JKQT T U  P$'=cU!%DE4O P&4D)U34s" e0 e)>%e9$"f *f? f05 g g/&g?/hh77 i8i< e&%e&) e65e69 ff fff-,f-0gg g,g, g''g,/ g<;g<?hhh43h47 ii iii9<jjcy)z'Adds the default connection attributes.NrQrs rSrPz/MySQLConnectionAbstract._add_default_conn_attrsyrrRct|tr t|}t |st d|dt t|j}||k7rt d|d|d|y#t$r}t ||d}~wwxYw)aValidates if it's a Python callable. Args: option_name (str): Connection option name. callback (str or callable): The fully qualified path to the callable or a callable. num_args (int): Number of positional arguments allowed. Raises: ProgrammingError: If `callback` is not valid or wrong number of positional arguments. .. versionadded:: 8.2.0 NzExpected a callable for 'rz ' requires z4 positional argument, but the callback provided has ) rrrJrJr1callablerNr parameters) option_namecallbacknum_argsrY num_paramss rSrSz*MySQLConnectionAbstract._validate_callable|s$ h $ :(2!"%>{m1#MN N8,778  !"K= H:6))3 6  " :&#0c9 :s A// B 8 BB server_versionc&t|ttfr|j}t j d}|j |}|s tdtd|jddD}|dkrtd|d|S) a9Checks 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 versionc32K|]}t|ywr)rI).0vs rS z@MySQLConnectionAbstract._check_server_version..s<(;1A(;sr)r zMySQL Version 'z' is not supported) r bytearraybytesdecoderecompilematchr/tuplegroups)rg regex_verrtversions rS_check_server_versionz-MySQLConnectionAbstract._check_server_versions ny%&8 9+224NJJFG / !?@ @< q(;<< V  ?>2BBT!UV VrR property_namec|jS)zGets the MySQL version. Returns: The MySQL server version as a tuple. If not previously connected, it will return `None`. rhrs rSget_server_versionz*MySQLConnectionAbstract.get_server_version###rR server_infoc|jS)zGets the original MySQL version information. Returns: The original MySQL server as text. If not previously connected, it will return `None`. )rrs rSget_server_infoz'MySQLConnectionAbstract.get_server_infosrRc|jS)zGets the MySQL Server version the connector is connected to. Returns: The MySQL server version as a tuple. If not previously connected, it will return `None`. r}rs rSrgz&MySQLConnectionAbstract.server_versionrrRcL |jdS#ttf$rYywxYw)zGets the original MySQL server version information. Returns: The original MySQL server as text. If not previously connected, it will return `None`. server_version_originalN)rirGr?rs rSrz#MySQLConnectionAbstract.server_infos. ??#<= =8$  s ##cy)aMReturns bool to indicate whether a transaction is active for the connection. The value is `True` regardless of whether you start a transaction using the `start_transaction()` API call or by directly executing an SQL statement such as START TRANSACTION or BEGIN. `in_transaction` was added in MySQL Connector/Python 1.1.0. Examples: ``` >>> cnx.start_transaction() >>> cnx.in_transaction True >>> cnx.commit() >>> cnx.in_transaction False ``` NrQrs rSin_transactionz&MySQLConnectionAbstract.in_transactionrrRrc(||_|jS)aSets 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 sequence, each item in the sequence sets the flag when the value is positive or unsets it when negative (see example below). Args: flags: A list (or tuple), each flag will be set or unset when it's negative. Returns: integer: Client flags. Raises: ProgrammingError: When the flags argument is not a set or an integer bigger than 0. Examples: ``` For example, to unset `LONG_FLAG` and set the `FOUND_ROWS` flags: >>> from mysql.connector.constants import ClientFlag >>> cnx.set_client_flags([ClientFlag.FOUND_ROWS, -ClientFlag.LONG_FLAG]) >>> cnx.reconnect() ``` )r)rflagss rSset_client_flagsz(MySQLConnectionAbstract.set_client_flagss:"   rRc|jS)z-Gets the client flags of the current session.rdrs rSrz$MySQLConnectionAbstract.client_flagss!!!rRct|tr |dkDr||_yt|ttfrB|D]<}|dkr |xjt |zc_(|xj|zc_>yt d)aSets 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 sequence, each item in the sequence sets the flag when the value is positive or unsets it when negative (see example below). Args: flags: A list (or tuple), each flag will be set or unset when it's negative. Raises: ProgrammingError: When the flags argument is not a set or an integer bigger than 0. Examples: ``` For example, to unset `LONG_FLAG` and set the `FOUND_ROWS` flags: >>> from mysql.connector.constants import ClientFlag >>> cnx.client_flags = [ClientFlag.FOUND_ROWS, -ClientFlag.LONG_FLAG] >>> cnx.reconnect() ``` rz.client_flags setter expect integer (>0) or setN)rrIrdrurabsr1)rrflags rSrz$MySQLConnectionAbstract.client_flagssq4 eS !eai!&D  t} -!8&&3t9*4&&&$.&  ##ST TrRct)akShuts down connection to MySQL Server. This method closes the socket. It raises no exceptions. Unlike `disconnect()`, `shutdown()` closes the client connection without attempting to send a `QUIT` command to the server first. Thus, it will not block if the connection is disrupted for some reason such as network failure. )NotImplementedErrorrs rSshutdownz MySQLConnectionAbstract.shutdownDs "!rRc&|j|zdkDS)z|Checks if a client flag is set. Returns: `True` if the client flag was set, `False` otherwise. rr)rrs rSisset_client_flagz)MySQLConnectionAbstract.isset_client_flagOs ""T)Q..rRc*|jddS)zGets the current time zone.zSELECT @@session.time_zoner info_queryrs rS time_zonez!MySQLConnectionAbstract.time_zoneWs;<   rRc<|jd|d||_y)zSets the time zone.zSET @@session.time_zone = 'rN)rrfrs rSrz!MySQLConnectionAbstract.time_zone^s! 4UG1=>rRcd|j|jdd|_|jS)zGets the SQL mode.zSELECT @@session.sql_moder)rerrs rSsql_modez MySQLConnectionAbstract.sql_modeds. >> !!__-HI!LDN~~rRct|ttfrdj|}|j d|d||_y)aSets 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] ``` rzSET @@session.sql_mode = 'rN)rrrurrrers rSrz MySQLConnectionAbstract.sql_modeks< edE] +HHUOE 3E7!<=rRcy)a9Sends a query which only returns 1 row. Shortcut for: ``` cursor = self.cursor(buffered=True) cursor.execute(query) return cursor.fetchone() ``` Args: query: Statement to execute. Returns: row: A tuple (RowType). NrQrquerys rSrz"MySQLConnectionAbstract.info_query~rrRNcd||j|_nd|_|||_yd|_y)zSets login information for MySQL. Sets the username and/or password for the user connecting to the MySQL Server. Args: username: Account's user name. password: Account's password. NrX)rrkrl)rrrs rSrHz!MySQLConnectionAbstract.set_logins3  !)DJDJ  %DNDNrR use_unicodec||_yzSets whether we return string fields as unicode or not. Args: value: A boolean - default is `True`. N)rrs rS set_unicodez#MySQLConnectionAbstract.set_unicodes !rRc|jS)z7Gets whether we return string fields as unicode or not.)r~rs rSrz#MySQLConnectionAbstract.use_unicoderrRcyrrQrs rSrz#MySQLConnectionAbstract.use_unicoderrRc4|jdd}|dk(S)z%Gets whether autocommit is on or off.zSELECT @@session.autocommitrr rrs rS autocommitz"MySQLConnectionAbstract.autocommits" =>qAzrRcF|rdnd}|jd|||_y)zToggles autocommit.ONOFFzSET @@session.autocommit = N)rrg)rrswitchs rSrz"MySQLConnectionAbstract.autocommits)E 4VH=> rRc|jS)zGets whether this connection retrieves warnings automatically. This method returns whether this connection retrieves warnings automatically. Returns `True`, or `False` when warnings are not retrieved. )rrs rSrz$MySQLConnectionAbstract.get_warningss!!!rRcHt|ts td||_y)zSets 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)rr rJrrs rSrz$MySQLConnectionAbstract.get_warningss"%&67 7"rRc|jS)zGets 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`. )rrs rSrz)MySQLConnectionAbstract.raise_on_warningss&&&rRc\t|ts td||_|r||_yy)aSets 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)rr rJrrrs rSrz)MySQLConnectionAbstract.raise_on_warningss2%&67 7"' !&D  rRc|jS)zGets 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. )rrs rS unread_resultz%MySQLConnectionAbstract.unread_result"""rRcHt|ts td||_y)zSets 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)rr rJrrs rSrz%MySQLConnectionAbstract.unread_result s"%&67 7#rRcR|jj|jdS)a Returns 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. )rget_charset_info _charset_idrs rS collationz!MySQLConnectionAbstract.collations&""33D4D4DEaHHrRcR|jj|jdS)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. rrget_inforrs rScharsetzMySQLConnectionAbstract.charset$s&""++D,<,<=a@@rRc|jS)The charset ID utilized during the connection phase. If the charset ID hasn't been set, the default charset ID is returned. )rrs rS charset_idz"MySQLConnectionAbstract.charset_id0s rRc|j2|jtS|jdkrtnt|_|jS)r)r)r_rhr$r%rs rSrz#MySQLConnectionAbstract._charset_id8sR    $##+ 32''&0,0      rRc||_y)z9Sets the charset ID utilized during the connection phase.N)r_rs rSrz#MySQLConnectionAbstract._charset_idNs "rRc`|jj|jd}|dvry|S)azReturns 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)utf8mb4utf8mb3binaryutf8r)rencodings rSpython_charsetz&MySQLConnectionAbstract.python_charsetSs6&&//0@0@A!D 7 7rRcd}t|ttfs|t|j dt|ts | td|rt|tr%|j j |\|_}}nt|tr&|j j ||\|_}}nqt|j d|r&|j j |\|_}}n/td}|j j |d\|_}}|jd|d|d|jr(|jj||j yy) aSets 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. Args: charset: Can be either the name of a character set, or the numerical equivalent as defined in `constants.CharacterSet`. collation: When collation is `None`, the default collation for the character set is used. Examples: The following will set the collation for the latin1 character set to `latin1_general_ci`: ``` >>> cnx = mysql.connector.connect(user='scott') >>> cnx.set_charset_collation('latin1', 'latin1_general_ci') ``` z+{} should be either integer, string or NoneNrz)collation should be either string or None)rz SET NAMES 'z ' COLLATE 'r) character_set) rrIrrJrrrrr"_execute_queryr set_charset)rrrerr_msg charset_namecollation_names rSset_charset_collationz-MySQLConnectionAbstract.set_charset_collationcsx6@'C:.73FW^^I67 7)S)i.CHI I '3' ''88A $ "GS) ''88)L $ "! !:;;  ##44y4I   ,I6G ##44W4M    k,{>BRRSTU >> NN & &|4CVCV & W rRc|jS)a Gets the connection context's timeout in seconds for each attempt to read any data from the server. `read_timeout` is number of seconds upto which the connector should wait for the server to reply back before raising an ReadTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the read operation is completed or stopped abruptly. rrs rSr[z$MySQLConnectionAbstract.read_timeout!!!rRcV| t|tr|dkr td||_y)a Sets or updates the connection context's timeout in seconds for each attempt to read any data from the server. `read_timeout` is number of seconds upto which the connector should wait for the server to reply back before raising an ReadTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the read operation is completed or stopped abruptly. Args: timeout: Accepts a non-negative integer which is the timeout to be set in seconds or None. Raises: InterfaceError: If a positive integer or None is not passed via the timeout parameter. Examples: The following will set the read_timeout of the current session to 5 seconds: ``` >>> cnx = mysql.connector.connect(user='scott') >>> cnx.read_timeout = 5 ``` Nr6Option read_timeout must be a positive integer or NonerrIr/rrtimeouts rSr[z$MySQLConnectionAbstract.read_timeouts42  gs+w{$L%rRc|jSa Gets the connection context's timeout in seconds for each attempt to send data to the server. `write_timeout` is number of seconds upto which the connector should spend to write to the server before raising an WriteTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the write operation is completed or stopped abruptly. rrs rSr\z%MySQLConnectionAbstract.write_timeout"""rRcV| t|tr|dkr td||_y)a Sets or updates the connection context's timeout in seconds for each attempt to send data to the server. `write_timeout` is number of seconds upto which the connector should spend to write to the server before raising an WriteTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the write operation is completed or stopped abruptly. Args: timeout: Accepts a non-negative integer which is the timeout to be set in seconds or None. Raises: InterfaceError: If a positive integer or None is not passed via the timeout parameter. Examples: The following will set the write_timeout of the current session to 5 seconds: ``` >>> cnx = mysql.connector.connect(user='scott') >>> cnx.write_timeout = 5 ``` Nr7Option write_timeout must be a positive integer or NonerrIr/rrs rSr\z%MySQLConnectionAbstract.write_timeouts42  gs+w{$M&rRcy)zMySQL connection ID.NrQrs rS connection_idz%MySQLConnectionAbstract.connection_idrrRcy)z>Gathers information of the MySQL server before authentication.NrQrs rS _do_handshakez%MySQLConnectionAbstract._do_handshakerrRcy)z)Opens the connection to the MySQL server.NrQrs rS_open_connectionz(MySQLConnectionAbstract._open_connection rrRc"|j|j|j|_|jr|j|_|j r|j |_|jr|j|jyy)zExecutes 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. rN) rrrgrrfrrerrrrs rS_post_connectionz(MySQLConnectionAbstract._post_connection sn ""4+;+;"<** ??!__DN >> NNDM       2 2 3 rRcy)aDisconnects from the MySQL server. This method tries to send a `QUIT` command and close the socket. It raises no exceptions. `MySQLConnection.close()` is a synonymous for `MySQLConnection.disconnect()` method name and more commonly used. To shut down the connection without sending a `QUIT` command first, use `shutdown()`. NrQrs rSrzMySQLConnectionAbstract.closerrRz5ClassVar[Callable[['MySQLConnectionAbstract'], None]] disconnectc l|r|jd i||j|j|jdd|jdd}}|s|r$|jj ||d|_|jtjzs|jy |j|j y#t$r]|jd|jxs |jd|j|j |jdYywxYw) a Connects 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. Args: **kwargs: For a complete list of possible arguments, see [1]. Examples: ``` >>> cnx = MySQLConnection(user='joe', database='test') ``` References: [1]: https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html rNrrrzSET PASSWORD = 'rz)ALTER USER CURRENT_USER() PASSWORD EXPIRErQ)rVrrrrrrrdr*CAN_HANDLE_EXPIRED_PASSWORDSrrr-rrmrl)rrUrrs rSconnectzMySQLConnectionAbstract.connect-s&  DKK !& !   JJy$ ' JJ{D ) i#22CCGYW D !!J$K$KK  ! ! # L**43C3C*D L!1$//2ST^^1TTUVW**43C3C*DJK Ls0C A#D32D3cfd}d}|jr9|jjttjj } ||k7rN|dz} |j |j|jrn |dkDr t|||k7rN||_trt||j"yy#ttf$r#}||k(rd|d|}t||Yd}~hd}~wwxYw#t$r/}tr#t||t||t!|d}~wwxYw)aAttempts 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. Args: attempts: Number of attempts to make when reconnecting. delay: Use it (defined in seconds) if you want to wait between each retry. Raises: InterfaceError: When reconnection fails. rN)rkindr z!Can not reconnect to MySQL after z attempt(s): )r` start_spanr2r9SpanKindCLIENTrr is_connectedr.IOErrorr/r r5r8r7r6ra)rattemptsdelaycounterspanrYmsg interface_errs rS reconnectz!MySQLConnectionAbstract.reconnectcs9$ <<<<**)0E0E+D X%!A+ ;OO%LLN((*+19%LX%.  %dDJJ 7 #w';(*?zJ++.%1-S1s: +; )$5&t];   sB C80CC8C5C0+C80C55C88 D0*D++D0cy)aReports whether the connection to MySQL Server is available or not. Checks whether the connection to MySQL is available using the `ping()` method, but unlike `ping()`, `is_connected()` returns `True` when the connection is available, `False` otherwise NrQrs rSrz$MySQLConnectionAbstract.is_connectedrrRcy)aChecks availability of the MySQL server. When reconnect is set to `True`, one or more attempts are made to try to reconnect to the MySQL server using the reconnect()-method. `delay` is the number of seconds to wait between each retry. When the connection is not available, an InterfaceError is raised. Args: reconnect: If True, one or more `attempts` are made to try to reconnect to the MySQL server, and these options are forwarded to the `reconnect()` method. attempts: Number of attempts to make when reconnecting. delay: Use it (defined in seconds) if you want to wait between each retry. Raises: InterfaceError: When the connection is not available. Use the `is_connected()` method if you just want to check the connection without raising an error. NrQ)rrrrs rSpingzMySQLConnectionAbstract.pingrrRcy)aCommits current transaction. This method is part of PEP 249 - Python Database API Specification v2.0. This method sends a COMMIT statement to the MySQL server, committing the current transaction. Since by default Connector/Python does not autocommit. It is important to call this method after every transaction that modifies data for tables that use transactional storage engines. Examples: ``` >>> stmt = "INSERT INTO employees (first_name) VALUES (%s), (%s)" >>> cursor.execute(stmt, ('Jane', 'Mary')) >>> cnx.commit() ``` NrQrs rScommitzMySQLConnectionAbstract.commitrrRcy)a^ Instantiates and returns a cursor. By default, `MySQLCursor` or `CMySQLCursor` is returned. Depending on the options while connecting, a buffered and/or raw cursor is instantiated instead. Also depending upon the cursor options, rows can be returned as a dictionary or a tuple. Dictionary based cursors are available with buffered output but not raw. It is possible to also give a custom cursor through the `cursor_class` parameter, but it needs to be a subclass of `mysql.connector.cursor.MySQLCursor` or `mysql.connector.cursor_cext.CMySQLCursor` according to the type of connection that's being used. **NOTE: The parameters read and write timeouts in cursors are unsupported for C-Extension.** Args: buffered: If `True`, the cursor fetches all rows from the server after an operation is executed. This is useful when queries return small result sets. raw: If `True`, the cursor skips the conversion from MySQL data types to Python types when fetching rows. A raw cursor is usually used to get better performance or when you want to do the conversion yourself. prepared: If `True`, the cursor is used for executing prepared statements. cursor_class: It can be used to pass a class to use for instantiating a new cursor. It must be a subclass of `cursor.MySQLCursor` or `cursor_cext.CMySQLCursor` according to the type of connection that's being used. dictionary: If `True`, the cursor returns rows as dictionaries. read_timeout: A positive integer representing timeout in seconds for each attempt to read any data from the server. write_timeout: A positive integer representing timeout in seconds for each attempt to send any data to the server. Returns: cursor: A cursor object. Raises: ProgrammingError: When `cursor_class` is not a subclass of `MySQLCursorAbstract`. ValueError: When cursor is not available. InterfaceError: When read_timeout or write_timeout is not a positive integer. NrQ)rbufferedrawprepared cursor_class dictionaryr[r\s rScursorzMySQLConnectionAbstract.cursorrrRcy)zExecutes a query.NrQrs rSrz&MySQLConnectionAbstract._execute_queryrrRcy)aRollbacks current transaction. Sends a ROLLBACK statement to the MySQL server, undoing all data changes from the current transaction. By default, Connector/Python does not autocommit, so it is possible to cancel transactions when using transactional storage engines such as `InnoDB`. Examples: ``` >>> stmt = "INSERT INTO employees (first_name) VALUES (%s), (%s)" >>> cursor.execute(stmt, ('Jane', 'Mary')) >>> cnx.rollback() ``` NrQrs rSrollbackz MySQLConnectionAbstract.rollback rrRc|jr td|rY|jjddj }gd}||vrt d|d|j d||C|jd krt d |jd |rd }nd }|j d|d}|r|dz }|j|y)anStarts 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. Args: consistent_snapshot: If `True`, Connector/Python sends WITH CONSISTENT SNAPSHOT with the statement. MySQL ignores this for isolation levels for which that option does not apply. isolation_level: Permitted values are 'READ UNCOMMITTED', 'READ COMMITTED', 'REPEATABLE READ', and 'SERIALIZABLE'. If the value is `None`, no isolation level is sent, so the default level applies. readonly: Can be `True` to start the transaction in READ ONLY mode or `False` to start it in READ WRITE mode. If readonly is omitted, the server's default access mode is used. Raises: ProgrammingError: When a transaction is already in progress and when `ValueError` when `isolation_level` specifies an Unknown level. Examples: 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') ``` zTransaction already in progressr )zREAD UNCOMMITTEDzREAD COMMITTEDzREPEATABLE READ SERIALIZABLEzUnknown isolation level ""z SET TRANSACTION ISOLATION LEVEL N)rzMySQL server version z does not support this featurez READ ONLYz READ WRITEzSET TRANSACTION zSTART TRANSACTIONz WITH CONSISTENT SNAPSHOT) rr1rrKrrJrrhr)rconsistent_snapshotisolation_levelreadonlylevellevels access_moders rSstart_transactionz)MySQLConnectionAbstract.start_transactionsN   "#DE E #))+33C=CCEEFF" #<_>> user_variables = {'var1': '1', 'var2': '10'} >>> session_variables = {'wait_timeout': 100000, 'sql_mode': 'TRADITIONAL'} >>> cnx.reset_session(user_variables, session_variables) ``` NrQ)ruser_variablessession_variabless rS reset_sessionz%MySQLConnectionAbstract.reset_sessiongrrRrc||_y) Sets the converter class to be used. Args: convclass: Should be a class overloading methods and members of `conversion.MySQLConverter`. N)r)r convclasss rSset_converter_classz+MySQLConnectionAbstract.set_converter_classs  )rRc|jS)z5Gets the converter class set for the current session.)rrs rSrz'MySQLConnectionAbstract.converter_classr rRc|rst|trc|jj|jd}||_|||j |_|j|j_ ytd)r rzFConverter class should be a subclass of conversion.MySQLConverterBase.N) issubclassr,rrrrrrr str_fallbackrG)rr!rs rSrz'MySQLConnectionAbstract.converter_classsp I/AB..778H8HI!LL$-D !&|T5E5EFDN*.*F*FDNN 'X rRc y)aRetrieves the next row of a query result set. Args: binary: If `True`, read as binary result (only meaningful for pure Python connections). columns: Field types (only meaningful for pure Python connections and when `binary=True`). raw: If `True`, the converter class does not convert the parsed values. prep_stmt: Prepared statement object (only meaningful for C-ext connections). Returns: tuple: The row as a tuple (RowType) containing byte objects, or `None` when no more rows are available. (at position 0). EOF packet information as a dictionary containing `status_flag` and `warning_count` (at position 1). Raises: InterfaceError: When all rows have been retrieved. NrQ)rrcolumnsr prep_stmtrUs rSget_rowzMySQLConnectionAbstract.get_rowrrRc y)aGets all rows returned by the MySQL server. Args: count: Used to obtain a given number of rows. If set to `None`, all rows are fetched. binary: If `True`, read as binary result (only meaningful for pure Python connections). columns: Field types (only meaningful for pure Python connections and when `binary=True`). raw: If `True`, the converter class does not convert the parsed values. prep_stmt: Prepared statement object (only meaningful for C-ext connections). Returns: tuple: A list of tuples (RowType) containing the row data as byte objects, or an empty list when no rows are available (at position 0). EOF packet information as a dictionary containing `status_flag` and `warning_count` (at position 1). Raises: InterfaceError: When all rows have been retrieved. NrQ)rcountrr(rr)rUs rSget_rowsz MySQLConnectionAbstract.get_rowsrrRcy)aChanges the current database. This method makes specified database the default (current) database. In subsequent queries, this database is the default for table references that include no explicit database qualifier. Args: database: Database to become the default (current) database. Returns: ok_packet: Dictionary containing the OK packet information. NrQ)rrs rS cmd_init_dbz#MySQLConnectionAbstract.cmd_init_dbrrRc y)aSends a query to the MySQL server. This method sends the query to the MySQL server and returns the result. To **send multiple statements, use the `cmd_query_iter()` method instead**. The returned dictionary contains information depending on what kind of query was executed. If the query is a `SELECT` statement, the result contains information about columns. Other statements return a dictionary containing OK or EOF packet information. Errors received from the MySQL server are raised as exceptions. **Arguments `raw`, `buffered` and `raw_as_string` are only meaningful for `C-ext` connections**. Args: query: Statement to be executed. raw: If `True`, the cursor skips the conversion from MySQL data types to Python types when fetching rows. A raw cursor is usually used to get better performance or when you want to do the conversion yourself. If not provided, take its value from the MySQL instance. buffered: If `True`, the cursor fetches all rows from the server after an operation is executed. This is useful when queries return small result sets. raw_as_string: Is a special argument for Python v2 and returns `str` instead of `bytearray`. Returns: dictionary: `Result` or `OK packet` information NrQ)rrrr raw_as_stringrUs rSrz!MySQLConnectionAbstract.cmd_queryrrRc y)aZSends one or more statements to the MySQL server. Similar to the `cmd_query()` method, but instead returns a generator object to iterate through results. It sends the statements to the MySQL server and through the iterator you can get the results. Use `cmd_query_iter()` when sending multiple statements, and separate the statements with semicolons. Args: statements: Statements to be executed separated with semicolons. Returns: generator: Generator object with `Result` or `OK packet` information. Examples: The following example shows how to iterate through the results after sending multiple statements: ``` >>> statement = 'SELECT 1; INSERT INTO t1 VALUES (); SELECT 2' >>> for result in cnx.cmd_query_iter(statement): >>> if 'columns' in result: >>> columns = result['columns'] >>> rows = cnx.get_rows() >>> else: >>> # do something useful with INSERT result ``` NrQ)r statementsrUs rScmd_query_iterz&MySQLConnectionAbstract.cmd_query_iter rrRcy)aSend the Refresh command to the MySQL server. This method sends the Refresh command to the MySQL server. The options argument should be a bitwise value using constants.RefreshOption. Typical usage example: ``` RefreshOption = mysql.connector.RefreshOption refresh = RefreshOption.LOG | RefreshOption.INFO cnx.cmd_refresh(refresh) ``` Args: options: Bitmask value constructed using constants from the `constants.RefreshOption` class. Returns: A dictionary representing the OK packet got as response when executing the command. Raises: ValueError: If an invalid command `refresh options` is provided. DeprecationWarning: If one of the options is deprecated for the server you are connecting to. NrQ)roptionss rS cmd_refreshz#MySQLConnectionAbstract.cmd_refreshCrrRcy)aCloses the current connection with the server. This method sends the `QUIT` command to the MySQL server, closing the current connection. Since there is no response from the MySQL server, the packet that was sent is returned. Returns: packet_sent: `None` when using a C-ext connection, else the actual packet that was sent. NrQrs rScmd_quitz MySQLConnectionAbstract.cmd_quit_rrRcy)zShuts down the MySQL Server. This method sends the SHUTDOWN command to the MySQL server. The `shutdown_type` is not used, and it's kept for backward compatibility. NrQ)r shutdown_types rS cmd_shutdownz$MySQLConnectionAbstract.cmd_shutdownlrrRcy)aSends the statistics command to the MySQL Server. Returns: dict: Stats packet information about the MySQL server including uptime in seconds and the number of running threads, questions, reloads, and open tables. NrQrs rScmd_statisticsz&MySQLConnectionAbstract.cmd_statisticstrrRctd)a|Get 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_SCHEMA)r0rQrRrScmd_process_infoz(MySQLConnectionAbstract.cmd_process_info~s I  rRcy)aKills a MySQL process. Asks the server to kill the thread specified by `mysql_pid`. Although still available, it is better to use the KILL SQL statement. Args: mysql_pid: Process ID to be killed. Returns: ok_packet: Dictionary containing the OK packet information. Examples: ``` >>> cnx.cmd_process_kill(123) # using cmd_process_kill() >>> cnx.cmd_query('KILL 123') # alternatively (recommended) ``` NrQ)r mysql_pids rScmd_process_killz(MySQLConnectionAbstract.cmd_process_killrrRcy)zInstructs the server to write debugging information to the error log. The connected user must have the `SUPER` privilege. Returns: ok_packet: Dictionary containing the EOF (end-of-file) packet information. NrQrs rS cmd_debugz!MySQLConnectionAbstract.cmd_debugrrRcy)zChecks whether the connection to the server is working. This method is not to be used directly. Use `ping()` or `is_connected()` instead. Returns: ok_packet: Dictionary containing the OK packet information. NrQrs rScmd_pingz MySQLConnectionAbstract.cmd_pingrrRc y)aChanges the current logged in user. It also causes the specified database to become the default (current) database. It is also possible to change the character set using the charset argument. The character set passed during initial connection is reused if no value of charset is passed via this method. Args: username: New account's username. password: New account's password. database: Database to become the default (current) database. charset: Client charset (see [1]), only the lower 8-bits. password1: New account's password factor 1 - it's used instead of `password` if set (higher precedence). password2: New account's password factor 2. password3: New account's password factor 3. oci_config_file: OCI configuration file location (path-like string). oci_config_profile: OCI configuration profile location (path-like string). openid_token_file: OpenID Connect token file location (path-like string). Returns: ok_packet: Dictionary containing the OK packet information. Examples: ``` >>> cnx.cmd_change_user(username='', password='', database='', charset=33) ``` References: [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_basic_character_set.html#a_protocol_character_set NrQ) rrrrr password1 password2 password3oci_config_fileoci_config_profiler=s rScmd_change_userz'MySQLConnectionAbstract.cmd_change_userrrRc y)a%Prepares a MySQL statement. Args: statement: statement to prepare. Returns: prepared_stmt: A `Prepared Statement` structure - a dictionary is returned when using a pure Python connection, and a `_mysql_connector.MySQLPrepStmt` object is returned when using a C-ext connection. References: [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_com_stmt_prepare.html NrQ)r statementrUs rScmd_stmt_preparez(MySQLConnectionAbstract.cmd_stmt_preparerrRc y)aFExecutes a prepared MySQL statement. Args: statement_id: Statement ID found in the dictionary returned by `MySQLConnection.cmd_stmt_prepare` when using a pure Python connection, or a `_mysql_connector.MySQLPrepStmt` instance as returned by `CMySQLConnection.cmd_stmt_prepare` when using a C-ext connection. data: Data sequence against which the prepared statement will be executed. parameters: Currently unused! flags: see [1]. Returns: dictionary or tuple: `OK packet` or `Result` information. Notes: The previous method's signature applies to pure Python, the C-ext has the following signature: ``` def cmd_stmt_execute( self, statement_id: CMySQLPrepStmt, *args: Any ) -> Optional[Union[Dict[str, Any], Tuple]]: ``` You should expect a similar returned value type, however, the input is different. In this case `data` must be provided as positional arguments instead of a sequence. References: [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_com_stmt_execute.html NrQ)r statement_iddatarbrrUs rScmd_stmt_executez(MySQLConnectionAbstract.cmd_stmt_executerrRc y)aDeallocates a prepared MySQL statement. Args: statement_id: Statement ID found in the dictionary returned by `MySQLConnection.cmd_stmt_prepare` when using a pure Python connection, or a `_mysql_connector.MySQLPrepStmt` instance as returned by `CMySQLConnection.cmd_stmt_prepare` when using a C-ext connection. NrQrrSrUs rScmd_stmt_closez&MySQLConnectionAbstract.cmd_stmt_close( rrRc y)a?Sends data for a column. Currently, not implemented for the C-ext. Args: statement_id: Statement ID found in the dictionary returned by `MySQLConnection.cmd_stmt_prepare` when using a pure Python connection, or a `_mysql_connector.MySQLPrepStmt` instance as returned by `CMySQLConnection.cmd_stmt_prepare` when using a C-ext connection. param_id: The parameter to supply data to [1]. data: The actual payload to send [1]. Returns: total_sent: The total number of bytes that were sent is returned. References: [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_com_stmt_send_long_data.html NrQ)rrSparam_idrTrUs rScmd_stmt_send_long_dataz/MySQLConnectionAbstract.cmd_stmt_send_long_data8 rrRc y)aResets data for prepared statement sent as long data. Args: statement_id: Statement ID found in the dictionary returned by `MySQLConnection.cmd_stmt_prepare` when using a pure Python connection, or a `_mysql_connector.MySQLPrepStmt` instance as returned by `CMySQLConnection.cmd_stmt_prepare` when using a C-ext connection. NrQrWs rScmd_stmt_resetz&MySQLConnectionAbstract.cmd_stmt_resetU rrRcy)aNResets the session state without re-authenticating. Reset command only works on MySQL server 5.7.3 or later. This method permits the session state to be cleared without reauthenticating. For MySQL servers older than 5.7.3 (when `COM_RESET_CONNECTION` was introduced) , the `reset_session()` method can be used instead - that method resets the session state by reauthenticating, which is more expensive. This method was added in Connector/Python 1.2.1. Returns: `True` for a successful reset otherwise `False`. NrQrs rScmd_reset_connectionz,MySQLConnectionAbstract.cmd_reset_connectione rrRreturnNone)rarUrzType[BaseException]r BaseExceptionrr rarb)rar )raz$List[Tuple[str, BinaryProtocolType]])rzTuple[str, BinaryProtocolType]rarbrrrar>)rarrarIra Optional[str])rrrarb)rr rarb)rar)rrrarb)rUrrarb)r)rcrrdzUnion[str, Callable]rerIrarb)rgrGrazTuple[int, ...])razOptional[Tuple[int, ...]])rUnion[int, Sequence[int]]rarI)rrirarb)rar)rrIrar )rzUnion[str, Sequence[int]]rarb)rrrazOptional[RowType]NN)rrhrrhrarbT)rrIrarb)rzOptional[Union[int, str]]rrhrarbra Optional[int]rrmrarb)r r)rrIrrIrarb)Fr r)rr rrIrrIrarb)NNNNNNN)rOptional[bool]rrorrorz%Optional[Type['MySQLCursorAbstract']]r ror[rmr\rmraz'MySQLCursorAbstract')rrrarb)FNN)rr rrhrrorarb)rOptional[Dict[str, Any]]rrprarb)r!Optional[Type[MySQLConverter]]rarb)rarq)FNNN) rr r(Optional[List[DescriptionType]]rror)Optional[CMySQLPrepStmt]rUrraz2Tuple[Optional[RowType], Optional[Dict[str, Any]]])NFNNN)r,rmrr r(rrrror)rsrUrraz.Tuple[List[RowType], Optional[Dict[str, Any]]])rrrarp)FFF) rrrrorr r1r rUrrarp)r3rrUrraz(Generator[Mapping[str, Any], None, None])r6rIrazDict[str, Any])razOptional[bytes]r)r;rmrarb)rarp)rBrIrarp) rXrXrXNrXrXrXrXrXrX)rrrrrrrrmrIrrJrrKrrLrrMrr=rrarp)rPrprUrraz(Union[Mapping[str, Any], CMySQLPrepStmt])rQrQr) rSUnion[int, CMySQLPrepStmt]rTzSequence[BinaryProtocolType]rbrrrIrUrraz&Optional[Union[Dict[str, Any], Tuple]])rSrtrUrrarb) rSrtrZrIrTrrUrrarI)drMrNrOrPrrrrpropertyrrrrrrrrrrrrrrsetterr rrVrP staticmethodrSryr:r#rr~rrgrrrrrrrrrrHrrrrrrrrrrrrr[r\rrrrrr__annotations__rrrrrr rr rrr"rr*r-r/rr4r7r9r<r>r@rCrErGrNrQrUrXr[r]r_rQrRrSrUrUs BR)h%!!     &&// 61] ~ORb!!$$__''%%& & ))* *HXT 6JK  $8 DG    D20)00?OPQ$R$0)00}MN O $$    (0)00~NO!P!>"""U"UH "/     __$  &IM % 8E  (0)00}MN!O!!!   !! "" # #''''&## $ $ I I A A  !!*""   UYAX0AXDQAX AXF " "%%> # #&&>##MM884     INJEM4Ll58n    .  &$("#'>B%)&*'+6  6 6 ! 6 < 6 # 6 $6 %6  6 6 p    $%*)-#' H!H'H! H  HT486: 0 4     >0)00?PQR)S)%%$37".2   1   ,     <  : $37".2    1    ,    8  @    $# % % %  %  %  %  "% % N       2    D  6            &    !%!"$!#, , ,  ,  ,  , , , ,  , ,  ", , \    2   *.0! ( 0( +(  (  (  (  0( ( T  0          0        8  0           rRrUceZdZdZ d$ d%dZd&dZ d'dZed(dZejd)dZed(dZ e jd)d Z e d* d+d Z e d,d Z e d- d.d Ze d/d Ze d0dZe d1d2dZe d3dZ d4dZe d5dZe d6dZd7dZd8d9dZd:d;dZeddZed=dZed?dZee jBdd>dZ"d@d Z#dAd!Z$dBd"Z%d,d#Z&y)CMySQLCursorAbstractzAbstract cursor class Abstract class defining cursor class with method and members required by the Python Database API Specification v2.0. Ncp||_|6t|ts tdt j ||_d|_d|_d|_d|_ d|_ d|_ g|_ g|_ d|_d|_d|_d|_||_||_d|_d|_d|_y) z#Defines the MySQL cursor interface.Ni)errnorrr Frj) _connectionrrUr/weakrefproxy _description _rowcount_last_insert_id _warnings_warning_count _executed_executed_list_stored_results arraysize_binaryr_nextrowrr_stmt_partitions_stmt_partition_stmt_map_results)r connectionr[r\s rSrzMySQLCursorAbstract.__init__~ s?I  !j*AB$400&}}Z8D =A .26:#$*.+-:<"    -9-:  @D',rRc|SrrQrs rSrzMySQLCursorAbstract.__enter__ rrRc$|jyrrrs rSrzMySQLCursorAbstract.__exit__ rrRc|jS)a Gets the cursor context's timeout in seconds for each attempt to read any data from the server. `read_timeout` is number of seconds upto which the connector should wait for the server to reply back before raising an ReadTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the read operation is completed or stopped abruptly. rrs rSr[z MySQLCursorAbstract.read_timeout rrRcV| t|tr|dkr td||_y)a Sets or updates the cursor context's timeout in seconds for each attempt to read any data from the server. `read_timeout` is number of seconds upto which the connector should wait for the server to reply back before raising an ReadTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the read operation is completed or stopped abruptly. Args: timeout: Accepts a non-negative integer which is the timeout to be set in seconds or None. Raises: InterfaceError: If a positive integer or None is not passed via the timeout parameter. Examples: The following will set the read_timeout of the current session to 5 seconds: ``` >>> cnx = mysql.connector.connect(user='scott') >>> cur = cnx.cursor() >>> cur.read_timeout = 5 ``` Nrrrrs rSr[z MySQLCursorAbstract.read_timeout s44  gs+w{$L%rRc|jSrrrs rSr\z!MySQLCursorAbstract.write_timeout rrRcV| t|tr|dkr td||_y)a Sets or updates the connection context's timeout in seconds for each attempt to send data to the server. `write_timeout` is number of seconds upto which the connector should spend to write to the server before raising an WriteTimeoutError. We can set this option to None, which would signal the connector to wait indefinitely till the write operation is completed or stopped abruptly. Args: timeout: Accepts a non-negative integer which is the timeout to be set in seconds or None. Raises: InterfaceError: If a positive integer or None is not passed via the timeout parameter. Examples: The following will set the write_timeout of the current session to 5 seconds: ``` >>> cnx = mysql.connector.connect(user='scott') >>> cur = cnx.cursor() >>> cur.write_timeout = 5 ``` Nrrrrs rSr\z!MySQLCursorAbstract.write_timeout s44  gs+w{$M&rRcy)aCalls a stored procedure with the given arguments. The arguments will be set during this session, meaning they will be called like ___arg where is an enumeration (+1) of the arguments. Args: procname: The stored procedure name. args: Sequence of parameters - it must contain one entry for each argument that the procedure expects. Returns: Does not return a value, but a result set will be available when the CALL-statement executes successfully. `callproc()` returns a modified copy of the input sequence. `Input` parameters are left untouched. `Output` and `input/output` parameters may be replaced with new values. Result sets produced by the stored procedure are automatically fetched and stored as `MySQLCursorBuffered` instances. The value returned (if any) is a `Dict` when cursor's subclass is `MySQLCursorDict`, else a `Tuple` (RowType). Raises: InterfaceError: When something is wrong Examples: 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, 6, 0) # 0 is to hold value of the OUT parameter pProd >>> cursor.callproc('multiply', args) ('5', '6', 30L) ``` References: [1]: https://dev.mysql.com/doc/connector-python/en/ connector-python-api-mysqlcursor-callproc.html NrQ)rprocnameargss rScallproczMySQLCursorAbstract.callproc rrRcy)a=Close the cursor. Use close() when you are done using a cursor. This method closes the cursor, resets all results, and ensures that the cursor object has no reference to its original connection object. This method is part of PEP 249 - Python Database API Specification v2.0. NrQrs rSrzMySQLCursorAbstract.closeB rrRcy)a>Executes the given operation (a MySQL script) 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,)) ``` If you want each single statement in the script to be related to its corresponding result set, you should enable the `map_results` switch - see workflow example below. If the given script uses `DELIMITER` statements (which are not recognized by MySQL Server), the connector will parse such statements to remove them from the script and substitute delimiters as needed. This pre-processing may cause a performance hit when using long scripts. Note that when enabling `map_results`, the script is expected to use `DELIMITER` statements in order to split the script into multiple query strings. The following characters are currently not supported by the connector in `DELIMITER` statements: `"`, `'`, #`, `/*` and `*/`. If warnings were generated, and `connection.get_warnings` is `True`, then `self.warnings` will be a list containing these warnings. Args: operation: Operation to be executed - it can be a single or a multi statement. params: The parameters found in the tuple or dictionary params are bound to the variables in the operation. Specify variables using `%s` or `%(name)s` parameter style (that is, using format or pyformat style). map_results: It is `False` by default. If `True`, it allows you to know what statement caused what result set - see workflow example below. Only relevant when working with multi statements. Returns: `None`. Example (basic usage): The following example runs many single statements in a single go and loads the corresponding result sets sequentially: ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation) result_set = cur.fetchall() # do something with result set ... while cur.nextset(): result_set = cur.fetchall() # do something with result set ... ``` In case the operation is a single statement, you may skip the looping section as no more result sets are to be expected. Example (statement-result mapping): The following example runs many single statements in a single go and loads the corresponding result sets sequentially. Additionally, each result set gets related to the statement that caused it: ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation, map_results=True) # statement 1 is `SET @a=1, @b='2024-02-01'`, # result set from statement 1 is `[]` - aka, an empty set. result_set, statement = cur.fetchall(), cur.statement # do something with result set ... # 1st call to `nextset()` will laod the result set from statement 2, # statement 2 is `SELECT @a, LENGTH('hello'), @b`, # result set from statement 2 is `[(1, 5, '2024-02-01')]`. # # 2nd call to `nextset()` will laod the result set from statement 3, # statement 3 is `SELECT @@version`, # result set from statement 3 is `[('9.0.0-labs-mrs-8',)]`. # # 3rd call to `nextset()` will return `None` as there are no more sets, # leading to the end of the consumption process of result sets. while cur.nextset(): result_set, statement = cur.fetchall(), cur.statement # do something with result set ... ``` In case the mapping is disabled (`map_results=False`), all result sets get related to the same statement, which is the one provided when calling `execute()`. In other words, the property `statement` will not change as result sets are consumed, which contrasts with the case in which the mapping is enabled. Note that we offer a new fetch-related API command which can be leveraged as a shortcut for consuming result sets - it is equivalent to the previous workflow. ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation, map_results=True) for statement, result_set in cur.fetchsets(): # do something with result set ``` NrQ)r operationparams map_resultss rSexecutezMySQLCursorAbstract.executeM rrRcy)aExecutes the given operation multiple times. The `executemany()` method will execute the operation iterating over the list of parameters in `seq_params`. `INSERT` statements are optimized by batching the data, that is using the MySQL multiple rows syntax. Args: operation: Operation to be executed. seq_params: Parameters to be used when executing the operation. Returns: Results are discarded. If they are needed, consider looping over data using the `execute()` method. Examples: An optimization is applied for inserts: The data values given by the parameter sequences are batched using multiple-row syntax. The following example inserts three records: ``` >>> data = [ >>> ('Jane', date(2005, 2, 12)), >>> ('Joe', date(2006, 5, 23)), >>> ('John', date(2010, 10, 3)), >>> ] >>> stmt = "INSERT INTO employees (first_name, hire_date) VALUES (%s, %s)" >>> cursor.executemany(stmt, data) ``` For the preceding example, the INSERT statement sent to MySQL is: ``` >>> INSERT INTO employees (first_name, hire_date) >>> VALUES ('Jane', '2005-02-12'), ('Joe', '2006-05-23'), ('John', '2010-10-03') ``` NrQ)rr seq_paramss rS executemanyzMySQLCursorAbstract.executemany rrRcy)aRetrieves next row of a query result set Returns: If the cursor's subclass is `MySQLCursorDict`, a dictionaries is returned, otherwise a tuple (RowType). `None` is returned when there aren't results to be read. Examples: ``` >>> cursor.execute("SELECT * FROM employees") >>> row = cursor.fetchone() >>> while row is not None: >>> print(row) >>> row = cursor.fetchone() ``` NrQrs rSfetchonezMySQLCursorAbstract.fetchone rrRcy)aFetches the next set of rows of a query result. Args: size: The number of rows returned can be specified using the size argument, which is one by default. Returns: If the cursor's subclass is `MySQLCursorDict`, a list of dictionaries is returned, otherwise a list of tuples (RowType). When no more rows are available, it returns an empty list. NrQ)rsizes rS fetchmanyzMySQLCursorAbstract.fetchmany rrRcy)aFetches all (or all remaining) rows of a query result set. Returns: If the cursor's subclass is `MySQLCursorDict`, a list of dictionaries is returned, otherwise a list of tuples (RowType). Examples: ``` >>> cursor.execute("SELECT * FROM employees ORDER BY emp_no") >>> head_rows = cursor.fetchmany(size=2) >>> remaining_rows = cursor.fetchall() ``` NrQrs rSfetchallzMySQLCursorAbstract.fetchall" rrRc#Kd}|js |j} |j}|jr |jn||f|j rA |j}|jr |jn||f|j r@yy#t$rg}Y}wxYw#t$rg}YOwxYww)aGenerates the result sets stream caused by the last `execute*()`. Returns: A 2-tuple; the first element is the statement that caused the result set, and the second is the result set itself. This method is used as part of the multi statement execution workflow - see example below. Example: Consider the following example where multiple statements are executed in one go: ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation, map_results=True) result_set, statement = cur.fetchall(), cur.statement # do something with result set ... while cur.nextset(): result_set, statement = cur.fetchall(), cur.statement # do something with result set ... ``` In this case, as an alternative to loading the result sets with `nextset()` in combination with a `while` loop, you can use `fetchsets()` which is equivalent to the previous approach: ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation) for statement, result_set in cur.fetchsets(): # do something with result set ``` N)rrPrr/nextset)rstatement_cached result_sets rS fetchsetszMySQLCursorAbstract.fetchsets2 sr %%#~~  J#44DNN:J  lln !]]_ #'"8"8>N  lln  J "   sQCB.CB/-.CC B,)C+B,,C/ B=:C<B==Ccy)aReturns an iterator (of MySQLCursorAbstract subclass instances) for stored results. This method returns an iterator over results which are stored when callproc() is called. The iterator will provide `MySQLCursorBuffered` instances. Examples: ``` >>> cursor.callproc('myproc') () >>> for result in cursor.stored_results(): ... print result.fetchall() ... [(1,)] [(2,)] ``` NrQrs rSstored_resultsz"MySQLCursorAbstract.stored_results rrRcy)aMakes the cursor skip to the next available set, discarding any remaining rows from the current set. This method is used as part of the multi statement execution workflow - see example below. Returns: It returns `None` if there are no more sets. Otherwise, it returns `True` and subsequent calls to the `fetch*()` methods will return rows from the next result set. Example: The following example runs many single statements in a single go and loads the corresponding result sets sequentially: ``` sql_operation = ''' SET @a=1, @b='2024-02-01'; SELECT @a, LENGTH('hello'), @b; SELECT @@version; ''' with cnx.cursor() as cur: cur.execute(sql_operation) result_set = cur.fetchall() # do something with result set ... while cur.nextset(): result_set = cur.fetchall() # do something with result set ... ``` In case the operation is a single statement, you may skip the looping section as no more result sets are to be expected. NrQrs rSrzMySQLCursorAbstract.nextset rrRcyzNot Implemented.NrQ)rsizess rS setinputsizesz!MySQLCursorAbstract.setinputsizes rrRcyrrQ)rrcolumns rS setoutputsizez!MySQLCursorAbstract.setoutputsize rrRcy)zResets the cursor to defaultNrQ)rfrees rSresetzMySQLCursorAbstract.reset rrRc|jS)a^This read-only property returns a list of tuples describing the columns 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 ``` See [1] for more details and examples. Returns: A list of tuples. References: [1]: https://dev.mysql.com/doc/connector-python/en/ connector-python-api-mysqlcursor-description.html )rrs rS descriptionzMySQLCursorAbstract.description s4   rRc|jS)aReturns the number of rows produced or affected. This property returns the number of rows produced by queries such as `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. )rrs rSrowcountzMySQLCursorAbstract.rowcount ~~rRc|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 a value available. Returns a long value or `None`. )rrs rS lastrowidzMySQLCursorAbstract.lastrowid s###rRc|jS)aGets a list of tuples (WarningType) containing warnings generated by the previously executed operation. Examples: ``` >>> cnx.get_warnings = True >>> cursor.execute("SELECT 'a'+1") >>> cursor.fetchall() [(1.0,)] >>> cursor.warnings [(u'Warning', 1292, u"Truncated incorrect DOUBLE value: 'a'")] ``` rrs rSwarningszMySQLCursorAbstract.warnings rrRc|jS)zReturns the number of warnings. This property returns the number of warnings generated by the previously executed operation. Returns an integer value. )rrs rS warning_countz!MySQLCursorAbstract.warning_count rrRc|jy |jjjdS#ttf$r+t t |jjcYSwxYw)aReturns the latest executed statement. When a multiple statement is executed, the value of `statement` corresponds to the one that caused the current result set, provided the statement-result mapping was enabled. Otherwise, the value of `statement` matches the statement just as provided when calling `execute()` and it does not change as result sets are traversed. Nzutf-8)rrrqrUnicodeDecodeErrorrrrs rSrPzMySQLCursorAbstract.statement sc >> ! 5>>'')009 9 23 5T^^1134 4 5s(87A21A2rrzc|jS)aReturns a list of tuples (WarningType) containing warnings generated by the previously executed operation. Examples: ``` >>> cnx.get_warnings = True >>> cursor.execute("SELECT 'a'+1") >>> cursor.fetchall() [(1.0,)] >>> cursor.fetchwarnings() [(u'Warning', 1292, u"Truncated incorrect DOUBLE value: 'a'")] ``` rrs rS fetchwarningsz!MySQLCursorAbstract.fetchwarnings+ rrRcHt|dr|jjSy)zGets a list of query attributes from the connector's side. Returns: List of existing query attributes. r}N)hasattrr}rrs rSget_attributesz"MySQLCursorAbstract.get_attributes< s# 4 '##// /rRct|ts td|t|tstd|dt |dr|j j ||fyy)aAdds a query attribute and its value into the connector's query attributes list. Query attributes must be enabled on the server - they are disabled by default. A warning is logged when setting query attributes for a server connection that does not support them. Args: name: Key name used to identify the attribute. value: A value converted to the MySQL Binary Protocol. Raises: ProgrammingError: If the value's conversion fails. &Parameter `name` must be a string typeNzObject z$ cannot be converted to a MySQL typer})rrr1MYSQL_PY_TYPESrr}r)rrrs rS add_attributez!MySQLCursorAbstract.add_attributeF sl$$"#KL L  Z~%F"% DE  4 '    / /u > (rRct|ts tdt|dr|jj |Sy)a,Removes a query attribute by name from the connector's query attributes list. If no match, `None` is returned, else the corresponding value is returned. Args: name: Key name used to identify the attribute. Returns: value: Attribute's value. rr}N)rrr1rr}rrs rSremove_attributez$MySQLCursorAbstract.remove_attribute] s>$$"#KL L 4 '##66t< <rRcRt|dr|jjyy)zrarbre)'rMrNrOrPrrrrur[rvr\rrrrrrrrrrrrrrrrrrrrPr:r#rrrrrrrQrRrSrzrzw s9=&*'+ '-5'-$'-% '-  '-R%!!    " "%%@ # #&&@.01 1 #+1 91 1 f   ! C C  C  C  C C J+ +  +  + + Z  $        K KZ  && & P+!!6  $ $ ##55 0)00zJKL ?."1rRrz)lrP __future__rrrrr~abcrrrrrr decimalr inspectr r typesr typingrrrrrrrrrrrrrrrrrrsslrr ImportError constantsr!r"r#r$r%r&r'r(r)r* conversionr+r,errorsr-r.r/r0r1opentelemetry.constantsr2r3r4r5opentelemetry.instrumentationr6r7r8r9 _decoratingr: optionfilesr; tls_ciphersr<r=r>r?r@rArBrCrDrErFrGrHutilsrIrJrrrrrRrTrpfloatrIrrrLrUrzrQrRrSrsg>2" #44( sM"s!   ;$*Q    1 2 O P :#       ^~" c~" BFz 1#z 1aI  s*D<<EE