
    ,hQ             	         d Z ddlmZ ddlZddlZddlZddlmZmZ ddl	m
Z
m	Z	mZmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% dZ&	 ddl'Z' e(e'd      re'jR                  rdZ&ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z? ddl@mAZAmBZBmCZCmDZD eDrddlEmFZFmGZGmHZHmIZI ddlJmKZK ddlLmMZM ddlNmOZOmPZP ddlmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[ ddl\m]Z]m^Z^ dZ_dZ`dZadZbdZcdZdeeee
e	efegeheef	Zi G d d e]      Zj G d! d"e      Zk G d# d$e      Zly# e*$ r Y w xY w)%z+Module gathering all abstract base classes.    )annotationsN)ABCabstractmethod)datedatetimetime	timedelta)Decimal)	signature)sleep)TracebackType)AnyBinaryIOCallableClassVarDequeDict	GeneratorIteratorListMappingNoReturnOptionalSequenceTupleTypeUnioncastFHAS_TLSv1_3T   )
CONN_ATTRS_DNDEFAULT_CONFIGURATIONDEPRECATED_METHOD_WARNINGMYSQL_DEFAULT_CHARSET_ID_57MYSQL_DEFAULT_CHARSET_ID_80OPENSSL_CS_NAMESTLS_CIPHER_SUITESTLS_VERSIONSCharacterSet
ClientFlag)MySQLConverterMySQLConverterBase)DatabaseErrorErrorInterfaceErrorNotSupportedErrorOperationalErrorProgrammingError)CONNECTION_SPAN_NAMEOPTION_CNX_SPANOPTION_CNX_TRACEROTEL_ENABLED)end_spanrecord_exception_eventset_connection_span_attrstrace)
deprecated)read_option_files)UNACCEPTABLE_TLS_CIPHERSUITESUNACCEPTABLE_TLS_VERSIONS)BinaryProtocolTypeCextEofPacketTypeDescriptionTypeEofPacketTypeHandShakeTypeMySQLConvertibleTypeMySQLScriptPartitionRowItemTypeRowType
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 '{}'. a  Option "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".c                      e Zd ZdZy)CMySQLPrepStmtaP  Structure 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__     [/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/mysql/connector/abstracts.pyrM   rM      s    rS   rM   c                  ^
   e Zd ZU dZdqdZdrdZ	 	 	 	 	 	 	 	 dsdZdrdZedtd       Z	edtd       Z
edud       Zdvd	Zdwd
ZdqdZdqdZdqdZedxd       Zedxd       Zedyd       Zedzd       Zeedxd              Zej.                  d{d       Zedtd       Zej.                  d|d       Zed}d       Zej.                  d~d       ZddZdqdZe	 d	 	 	 	 	 	 	 dd       Zedd       Z e e jB                  d            dd       Z" e e jB                  d            dzd        Z#edd!       Z$edzd"       Z%eedtd#              Z& e e jB                  d$            dd%       Z'edyd&       Z(e(j.                  dd'       Z(dd(Z)dd)Z*edxd*       Z+e+j.                  d{d+       Z+edxd,       Z,e,j.                  dd-       Z,edd.       Z-	 d	 	 	 	 	 dd0Z. e e jB                  d1            dd|d2       Z/edtd3       Z0e0j.                  ed|d4              Z0edtd5       Z1e1j.                  d|d6       Z1edtd7       Z2e2j.                  d|d8       Z2edtd9       Z3e3j.                  d|d:       Z3edtd;       Z4e4j.                  d|d<       Z4edxd=       Z5edxd>       Z6edyd?       Z7edyd@       Z8e8j.                  ddA       Z8edxdB       Z9	 d	 	 	 	 	 ddCZ:eddD       Z;e;j.                  ddE       Z;eddF       Z<e<j.                  ddG       Z<eeddH              Z=edqdI       Z>edqdJ       Z?dqdKZ@edqdL       ZAeAZBdMeCdN<   ddOZDdddPZEedtdQ       ZFedddR       ZGedqdS       ZHe	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddT       ZIeddU       ZJedqdV       ZK	 	 	 d	 	 	 	 	 	 	 ddWZL	 	 d	 	 	 	 	 ddXZM e e jB                  dY            ddZ       ZNedd[       ZOeOj.                  dd\       ZOe	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd]       ZPe	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd^       ZQedd_       ZRe	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd`       ZSe	 	 	 	 	 	 dda       ZTeddb       ZUeddc       ZVedddd       ZWedde       ZXeddf       ZYeddg       ZZeddh       Z[eddi       Z\e	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddj       Z]e	 	 	 	 	 	 ddk       Z^e	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddl       Z_e	 	 	 	 	 	 ddm       Z`e	 	 	 	 	 	 	 	 	 	 ddn       Zae	 	 	 	 	 	 ddo       Zbedtdp       Zcy/)MySQLConnectionAbstractz8Abstract class for classes connecting to a MySQL server.c                   d| _         	 d| _        d| _        d| _        t	        j
                         | _        d| _        d| _        d| _	        d| _
        d| _        i | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        i | _        t2        d   | _        d| _        d| _        d| _        d| _        d| _        d| _         d| _!        d| _"        d| _#        t2        d	   | _$        t2        d
   | _%        t2        d   | _&        d| _'        d| _(        d| _)        d| _*        d| _+        t2        d   | _,        t2        d   | _-        d| _.        i | _/        d| _0        d| _1        d| _2        d| _3        d| _4        d| _5        d| _6        d| _7        d| _8        d| _9        tu               | _;        d| _<        	 d| _=        y)
InitializeNTF z	127.0.0.1i  r   ssl_disabledconnect_timeoutread_timeoutwrite_timeoutallow_local_infileallow_local_infile_in_path)>$_MySQLConnectionAbstract__charset_id_tracer_spanotel_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_queryselfs    rT   __init__z MySQLConnectionAbstract.__init__   s    ,0	 !
.2%","8"8":(,)-!&:>37+-
 !!! %

+/!#!"FH	#8#H!&/326 OS59#15"&#((-2G3
  -B.,Q-B?-S$$)',	%*)>?S)T :O(;
( *.!;=!&+/15)-!37@D-2$$&+,0,8N=A$	( (,(rS   c                    | S NrR   r   s    rT   	__enter__z!MySQLConnectionAbstract.__enter__      rS   c                $    | j                          y r   closer   exc_type	exc_value	tracebacks       rT   __exit__z MySQLConnectionAbstract.__exit__       	

rS   c                    | S )zReturns self for `weakref.proxy`.

        This method is used when the original object is needed when using
        `weakref.proxy`.
        rR   r   s    rT   get_selfz MySQLConnectionAbstract.get_self  s	     rS   c                d    | j                   xs# | j                  duxr t        j                  dk(  S )z)Returns `True` if is a secure connection.Nposix)r   rt   osnamer   s    rT   	is_securez!MySQLConnectionAbstract.is_secure!  s3      
T)@bgg.@	
rS   c                    | j                   S )zReturns If have next result.)r   r   s    rT   have_next_resultz(MySQLConnectionAbstract.have_next_result(  s     %%%rS   c                H    t        | j                  j                               S )zReturns query attributes list.)listr   itemsr   s    rT   query_attrsz#MySQLConnectionAbstract.query_attrs-  s     D%%++-..rS   c                J    |\  }}|| j                   vr|| j                   |<   yy)a  Adds 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.
        Nr   )r   value	attr_name
attr_values       rT   query_attrs_appendz*MySQLConnectionAbstract.query_attrs_append2  s1     !&	:D---+5Di( .rS   c                :    | j                   j                  |d      S )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)r   popr   r   s     rT   query_attrs_removez*MySQLConnectionAbstract.query_attrs_remove?  s       $$T400rS   c                    i | _         y)z5Clears query attributes list on the connector's side.Nr   r   s    rT   query_attrs_clearz)MySQLConnectionAbstract.query_attrs_clearI  s
    rS   c                   g }| j                   d   }t        |t              r|j                  d      r|j	                  d      st        d| d      |dd j                  d      }|st        d	      |D ]4  }|j                         j                         }|s$|j                  |       6 n8t        |t        t        f      r|D cg c]  }|s|	 }}nt        d
| d      | j                   j                  dd      	t        dd n| j                   d   dd }|j                  d       |d   }g g g}i }g }	t        dt        j                  |      dz    D ]2  }
|j!                  t"        |
          |	j%                  t&        |
          4 |D ]  }d|v r9||	v r5|t&        d   v r|d   j                  |       +|d   j                  |       @||v rd||   }||v r t        t(        j+                  d|            |t"        d   v r|d   j                  ||          |d   j                  ||          t        d| d       |d   s|d   st        d      |d   D ]*  }|t,        d   j/                         v st1        d| d       |d   D ]*  }|t,        d   j/                         v st1        d| d       dj3                  |d         dj3                  |d         g| j                   d<   yc c}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.3r   r   zThe value 'z1' in tls_ciphersuites is not a valid cipher suitez:No valid cipher suite found in the 'tls_ciphersuites' listzTLSv1.2zCipher z( when used with TLSv1.2 is unacceptable.z( when used with TLSv1.3 is unacceptable.:)rw   
isinstancestr
startswithendswithAttributeErrorsplitstripupperappendr   setgetr(   sortindexupdater'   extendr&   DUPLICATED_IN_LIST_ERRORformatr=   valuesr0   join)r   r   tls_cstls_css_tls_csr   newer_tls_vertranslated_namesiani_cipher_suites_namesossl_cipher_suites_namestls_verr   translated_namecipher_as_ossls                 rT   _validate_tls_ciphersuitesz2MySQLConnectionAbstract._validate_tls_ciphersuitesM  s   -.fc"%%c*vs/C$?xqI  Qrl((-G$L  # 5 ,,...0$++G45
 s,5;F6vFF ))/3  yy}}^T2: O>*1- 	 	$'$Q .0H#% .0  $$Kl&8&8&G!&KL 	GG$++,=g,FG$++,<W,EF	G % 	Dd{t'??+I66$Q'..t4$Q'..t411":4"@"&66(077!3? 8  
 ,Y77$Q'../G/MN$Q'../G/MN$!$ (# # '	.  "+;A+> L 
 /q1 	N!>y!I!P!P!RR'n--UV 	
 /q1 	N!>y!I!P!P!RR'n--UV 	 HH%a()HH%a())
		$%K  Gs   K9K9c                   g }| j                   d   }t        |t              r|j                  d      r|j	                  d      st        d| d      |dd j                  d      }|D ]M  }|j                         }|d	k(  r||v r t        t        j                  d|
            |j                  |       O |dgk(  rt        st        t        j                  |t                    t        |t              rJ|st        d      |D ]7  }||v r t        t        j                  d|
            |j                  |       9 nNt        |t              r|D ]  }|j                  |        n%t        ddj!                  t               d| d      |st        d      g }g }g }|D ]F  }|t        v r|j                  |       |t"        v r|j                  |       6|j                  |       H |r?|dgk(  r)t        s#t%        t        j                  |t                    || j                   d<   y|r#t%        t&        j                  |t                    |r#t        t(        j                  t                    y)z"Validates the tls_versions option.r   r   r   z%tls_versions must be a list, found: 'r   r    r   r   rY   r   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)rw   r   r   r   r   r   r   r   r   r   r   TLS_V1_3_SUPPORTEDTLS_VER_NO_SUPPORTEDr(   r   r   r   r>   r0   TLS_VERSION_UNACCEPTABLE_ERRORTLS_VERSION_ERROR)r   r   tls_versiontls_versr   use_tls_versionsunacceptable_tls_versionsinvalid_tls_versionss           rT   _validate_tls_versionsz.MySQLConnectionAbstract._validate_tls_versions  s   ii/k3'**3/K4H4H4M$;K=J  #1R(..s3H# 
1%mmo"$,.(077!/{ 8  
 ##K0
1 I;&/A$(//\J  T*$*  ' -l*(077!/w 8  
 ##G,- S)& -##G,- !ii-.jaI 
  C 
 $&!!# 	5G,& ''033)009$++G4	5 I;.7I'(//\J  )9DIIn%&#.55-| 
 " !2!9!9'<!PQQ "rS   c                    | j                   S )z6The user name used for connecting to the MySQL server.)rl   r   s    rT   userzMySQLConnectionAbstract.user       zzrS   c                    | j                   S )z MySQL server IP address or name.)rr   r   s    rT   server_hostz#MySQLConnectionAbstract.server_host  r   rS   c                    | j                   S )zMySQL server TCP/IP port.)rs   r   s    rT   server_portz#MySQLConnectionAbstract.server_port  r   rS   c                    | j                   S )z8The Unix socket file for connecting to the MySQL server.)rt   r   s    rT   unix_socketz#MySQLConnectionAbstract.unix_socket          rS   c                     y)zThe current database.NrR   r   s    rT   databasez MySQLConnectionAbstract.database      rS   c                ,    | j                  d|        y)zSets the current database.zUSE N)	cmd_queryr   r   s     rT   r  z MySQLConnectionAbstract.database  s     	eW~&rS   c                    | j                   S )z#Returns whether to consume results.)r   r   s    rT   can_consume_resultsz+MySQLConnectionAbstract.can_consume_results       $$$rS   c                6    t        |t              sJ || _        y)zSets if can consume results.N)r   boolr   r	  s     rT   r  z+MySQLConnectionAbstract.can_consume_results   s     %&& %rS   c                    | j                   S )z'Returns the pool configuration version.r   r   s    rT   pool_config_versionz+MySQLConnectionAbstract.pool_config_version&  s     (((rS   c                    || _         y)z#Sets the pool configuration versionNr  r	  s     rT   r  z+MySQLConnectionAbstract.pool_config_version+  s     %*!rS   c                2   |j                  t        d      | _        |j                  t        d      | _        |j                         }d|v rt        d      t        dXi |}	 |d   | _        |d= 	 |d   | _
        |d= 	 t        j                         }|d   xs || _        |d= 	 |d   rd| _        t        j                  g| _        |j!                  d	t"        d	         | _        |j!                  d
t"        d
         | _        d}| j&                  rt(        j*                  j-                  | j&                        }|r>t(        j*                  j/                  |      rt(        j*                  j1                  |      rt(        j*                  j3                  |      rt5        d      | j$                  s| j&                  rt        j6                  g| _        nt        j6                   g| _        	 |d   sd| _        nd| _        	 |d   | _        |d= | j:                  dk(  rt=        d| j:                   d      	 |d   | _        g d}|D ]  \  }}	 ||vr||   ||<   ||=  d|v sd|v r$	 |d   }	|d= 	 |d   }
|d= | jG                  |	|
       d|v r|d   r
|d   | _$        	 tK        |d         | _&        |d= d|v r|j                  d      | _(        d|v r|d   | _)        |d= d}|jU                         D ]  \  }}	 t"        |    |jW                  d      r0d}| jX                  j[                  |j]                  dd      |i       Q|jW                  d      r d}| jX                  j[                  ||i       d |z   }	 t_        | ||ja                                 | jb                  rt(        jd                  d!k(  rd| _(        | jP                  r4| j:                  d"k(  rt=        d#      | j:                  d$k(  rt=        d%      |rrd&| jX                  vrt"        d'   | jX                  d&<   d(| jX                  vrt"        d)   | jX                  d(<   d*| jX                  vs| jX                  d*   d| jX                  d*<   tg        d+| jX                  v       tg        d,| jX                  v       k7  rt5        d-      ti        d.      ti        | jX                        k  sd| jX                  d+<   d| jX                  d,<   n.| jX                  d+   du | jX                  d,   du k7  rt5        d/      | jX                  j!                  d0      | jk                          | jX                  j!                  d1      | jm                          | jn                  i | _7        ntq        | jn                  tr              st=        d2      | jn                  jU                         D ]  \  }}|tt        v rtq        |tv              st=        d3| d4| jn                   d      ty        |      d5kD  rt=        d6| d7      |jW                  d       rt=        d8      tq        |tv              st=        d9| d:| d;      ty        |      d<kD  st=        d9| d:| d=       | jz                  t        j|                  z  r| j                          d>|v ry|d>   ttq        |d>   tv              st=        d?      |d>   j                         }|d@k(  r&t(        jd                  dAk7  rt=        dB      dC| _A        n|dDk(  rdE| _A        nt=        dF      dG|v r|dG   |dG   | _B        tq        | j                  tv              st=        t        j                  dHI            | j                  dk(  rt=        t        j                  dJI            dK| j                  vrt=        t        j                  dLI            | j                  r| j                  dM| j                  dN       |j!                  dO      |dO   | _G        tq        | j                  tv              st=        t        j                  dHI            | j                  dk(  rt=        t        j                  dPI            t(        j*                  j/                  | j                        st=        dQ| j                   dR      |j!                  dS      >|dS   | _I        tq        | j                  tJ              r| j                  dTk  rt=        dU      |j!                  dV      ?|dV   | _J        tq        | j                  tJ              r| j                  dTk  rt=        dW      yy# t        $ r Y w xY w# t        $ r Y w xY w# t        $ r Y w xY w# t        $ r Y w xY w# t        $ r d| _        Y w xY w# t        $ r d| _        Y w xY w# t        $ r Y t@        $ r}t5        d      |d}~ww xY w# t        $ r Y w xY w# t        $ r | jB                  }	Y w xY w# t        $ r | jD                  }
Y w xY w# t        $ r Y tN        $ r}t=        d      |d}~ww xY w# t        $ r t5        d| d      dw xY w# t4        $ r t_        | ||       Y w xY w)Ya  Configures 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
        Ndsnz!Data source name is not supportedget_warningsraise_on_warningsclient_flagscompressTr^   r_   z.allow_local_infile_in_path must be a directoryconsume_resultsFauth_pluginrY   authentication_webauthn_clientr   z5' cannot be used as the default authentication pluginconverter_classzEConverter class should be a subclass of conversion.MySQLConverterBase))dbr  )usernamer   )passwdpassword)r[   connection_timeout)read_default_fileoption_filesr   r   hostportz'TCP/IP port number should be an integerrZ   init_commandzUnsupported argument 'ssl_tls__r   mysql_clear_passwordzEClear password authentication is not supported over insecure channels$authentication_openid_connect_clientzEOpenID Connect authentication is not supported over insecure channelsverify_certssl_verify_certverify_identityssl_verify_identitycakeycertz:ssl_key and ssl_cert need to be both specified, or neither)r1  r2  z4ssl_key and ssl_cert need to be both set, or neitherr   r   zconn_attrs must be of type dictz+Attribute name should be a string, found: 'z' in '    zAttribute 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 typei   z$' exceeds 1024 characters limit sizekerberos_auth_modez('kerberos_auth_mode' must be of type strsspintz6'kerberos_auth_mode=SSPI' is only available on WindowsMySQLSSPIKerberosAuthPlugingssapiMySQLKerberosAuthPluginz@Invalid 'kerberos_auth_mode' mode. Please use 'SSPI' or 'GSSAPI'krb_service_principalzis not a string)errorzcan not be an empty string/zis incorrectly formattedwebauth_callbackr    openid_token_filezcannot be an empty stringz
The path 'z1' provided via 'openid_token_file' does not existr\   r   z.Option read_timeout must be a positive integerr]   z/Option write_timeout must be a positive integerrR   )Kr   r4   rb   r5   ra   copyr0   r<   r  KeyErrorr  r*   rd   r  r   COMPRESSr   r"   r   r   r   pathabspathexistsisdirislinkr   LOCAL_FILESr   r   r/   r  	TypeErrorrl   rm   	set_loginrr   intrs   
ValueErrorrx   r   r   r   rw   r   replacesetattrr   rt   r   r  r   r   r   rk   r   dictr!   r   lenre   CONNECT_ARGS_add_default_conn_attrslowerr   r}   KRB_SERVICE_PRINCIPAL_ERRORr   r|   _validate_callabler~   OPENID_TOKEN_FILE_ERRORr   r   )r   kwargsconfigdefaultinfile_in_patherr
compat_mapcompat	translater   r   set_ssl_flagr1  r   	attributer   r   r4  s                     rT   rW  zMySQLConnectionAbstract.config0  s   " ZZ6
zz"3T:F?#$GHH #,V,	 &~ 6D~&	%+,?%@D"*+
	 ,,.G &~ 6 A'D~&	j!!%%/%8%8$9! $*:: "78L"M$
  ,2::(!">?,
( ++WW__T-M-MNNGGNN>2n577>>.1$%UVV##t'G'G!+!7!7 8D","8"8!8 9D	*+,(-%(,%
	# &} 5D}%
  @@ D%%& '  	#)*;#<D 

 ", 	FIF*(.vF9%6N		 VzV3"f~6N*!*-:& NN4* VvDJ	UVF^,DJv V#!'N!;D V#!'!7D~&  ,,. 	4JCP%c* ~~f%#		  #++fb"95!AB'#		  #u.#I	4D)U[[];	4( G!3!%D  $::$[    $JJ$[  DII-+@AR+S		-( 		1/D)0		+, 499$		$(?"$		$ETYY&'4$))0C+DD$P  '3tyy>9#'		% $(		&!))E"d*		&0AT0IJ$J  yy}}^,8++-yy}}/0<//1#!DD,,d3 !BCC)-)9)9)?)?)A %	:-!)S1(%;fT-=-=,>aA 
 y>B&(*9+5WX  '',(4 
 "*c2(%i[
:, G+ + 
 z?T)(%i[
:, G= = 9B 
 7 77((*6)f5I.J.Vf%9:C@$%OPP!'(<!=!C!C!E!V+77d?(P  +H'#x/*C'$V 
 $v-./;*01H*ID'd993?$/66=N6O  **b0$/66: 7  
 $555$/66=W6X  ""##$68O8OQRS::)*6&,-@&AD#d55s;$+229J2K  &&",$+229T2U  77>>$"9"9:$ !8!8 9 :% % 
 ::n%1!'!7Dd00#6$:L:Lq:P$%UVV::o&2"("9Dd11374;N;NQR;R$%VWW <S 3M	  		
  		  		  		<  	*$)D!	*  	# "D	#  	 	 0 	(    "zz"
  *>>*  	 	U !JKQTT	U   P$'=cU!%DE4OP & 4D)U34s   "e 0e) >%e9 $"f	 *f ?f0 5
g g/&g? /h h7 7	i8i<	e&%e&)	e65e69	ff		fff-,f-0gg	g,g,g''g,/	g<;g<?hhh43h47	iiiii9<jjc                     y)z'Adds the default connection attributes.NrR   r   s    rT   rQ  z/MySQLConnectionAbstract._add_default_conn_attrsz  r  rS   c                   t        |t              r	 t        |      }t        |      st	        d|  d      t        t        |      j                        }||k7  rt	        d|  d| d|       y# t        $ r}t	        |       |d}~ww xY w)a  Validates 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
        NzExpected a callable for 'r   z' requires z4 positional argument, but the callback provided has )	r   r   rK   rK  r2   callablerO  r   
parameters)option_namecallbacknum_argsrZ  
num_paramss        rT   rT  z*MySQLConnectionAbstract._validate_callable}  s    $ h$:(2 !"%>{m1#MNN 8,778
!"K=H: 6))36  "  :&#0c9:s   A/ /	B
8BB
server_versionc                &   t        | t        t        f      r| j                         } t	        j
                  d      }|j                  |       }|st        d      t        d |j                         dd D              }|dk  rt        d|  d      |S )	a9  Checks 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})(.*)zFailed parsing MySQL versionc              3  2   K   | ]  }t        |        y wr   )rJ  ).0vs     rT   	<genexpr>z@MySQLConnectionAbstract._check_server_version.<locals>.<genexpr>  s     <1A<s   r      )   r    zMySQL Version 'z' is not supported)
r   	bytearraybytesdecoderecompilematchr/   tuplegroups)rh  	regex_verru  versions       rT   _check_server_versionz-MySQLConnectionAbstract._check_server_version  s     ny%&89+224NJJFG	/ !?@@<q(;<<V ?>2BBT!UVVrS   property_namec                    | j                   S )zGets the MySQL version.

        Returns:
            The MySQL server version as a tuple. If not previously connected, it will
            return `None`.
        ri   r   s    rT   get_server_versionz*MySQLConnectionAbstract.get_server_version       ###rS   server_infoc                    | j                   S )zGets the original MySQL version information.

        Returns:
            The original MySQL server as text. If not previously connected, it will
            return `None`.
        )r  r   s    rT   get_server_infoz'MySQLConnectionAbstract.get_server_info  s     rS   c                    | j                   S )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~  r   s    rT   rh  z&MySQLConnectionAbstract.server_version  r  rS   c                L    	 | j                   d   S # t        t        f$ r Y yw xY w)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)rj   rH  r@  r   s    rT   r  z#MySQLConnectionAbstract.server_info  s.    	??#<==8$ 		s    ##c                     y)aM  Returns 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
            ```
        NrR   r   s    rT   in_transactionz&MySQLConnectionAbstract.in_transaction  r  rS   r  c                (    || _         | j                   S )a  Sets 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  )r   flagss     rT   set_client_flagsz(MySQLConnectionAbstract.set_client_flags  s    : "   rS   c                    | j                   S )z-Gets the client flags of the current session.re   r   s    rT   r  z$MySQLConnectionAbstract.client_flags  s     !!!rS   c                   t        |t              r|dkD  r|| _        yt        |t        t        f      rB|D ]<  }|dk  r | xj                  t        |       z  c_        (| xj                  |z  c_        > yt        d      )a  Sets 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()
            ```
        r   z.client_flags setter expect integer (>0) or setN)r   rJ  re   rv  r   absr2   )r   r  flags      rT   r  z$MySQLConnectionAbstract.client_flags   sv    4 eS!eai!&Dt}- /!8&&3t9*4&&&$.&	/ ##STTrS   c                    t         )ak  Shuts 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.
        )NotImplementedErrorr   s    rT   shutdownz MySQLConnectionAbstract.shutdownE  s
     "!rS   c                &    | j                   |z  dkD  S )z|Checks if a client flag is set.

        Returns:
            `True` if the client flag was set, `False` otherwise.
        r   r  )r   r  s     rT   isset_client_flagz)MySQLConnectionAbstract.isset_client_flagP  s     ""T)Q..rS   c                *    | j                  d      d   S )zGets the current time zone.zSELECT @@session.time_zoner   
info_queryr   s    rT   	time_zonez!MySQLConnectionAbstract.time_zoneX  s     ;<
 	
rS   c                <    | j                  d| d       || _        y)zSets the time zone.zSET @@session.time_zone = 'r   N)r  rg   r	  s     rT   r  z!MySQLConnectionAbstract.time_zone_  s!     	4UG1=>rS   c                d    | j                   | j                  d      d   | _         | j                   S )zGets the SQL mode.zSELECT @@session.sql_moder   )rf   r  r   s    rT   sql_modez MySQLConnectionAbstract.sql_modee  s.     >>!!__-HI!LDN~~rS   c                    t        |t        t        f      rdj                  |      }| j	                  d| d       || _        y)a  Sets 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   zSET @@session.sql_mode = 'r   N)r   r   rv  r   r  rf   r	  s     rT   r  z MySQLConnectionAbstract.sql_model  s<     edE]+HHUOE3E7!<=rS   c                     y)a9  Sends 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).
        NrR   r   querys     rT   r  z"MySQLConnectionAbstract.info_query  r  rS   Nc                d    ||j                         | _        nd| _        ||| _        yd| _        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.
        NrY   )r   rl   rm   )r   r  r   s      rT   rI  z!MySQLConnectionAbstract.set_login  s3     !)DJDJ%DNDNrS   use_unicodec                    || _         yzSets whether we return string fields as unicode or not.

        Args:
            value: A boolean - default is `True`.
        N)r  r	  s     rT   set_unicodez#MySQLConnectionAbstract.set_unicode  s     !rS   c                    | j                   S )z7Gets whether we return string fields as unicode or not.)r   r   s    rT   r  z#MySQLConnectionAbstract.use_unicode  r  rS   c                     yr  rR   r	  s     rT   r  z#MySQLConnectionAbstract.use_unicode  r  rS   c                4    | j                  d      d   }|dk(  S )z%Gets whether autocommit is on or off.zSELECT @@session.autocommitr   r    r  r	  s     rT   
autocommitz"MySQLConnectionAbstract.autocommit  s"      =>qAzrS   c                F    |rdnd}| j                  d|        || _        y)zToggles autocommit.ONOFFzSET @@session.autocommit = N)r  rh   )r   r   switchs      rT   r  z"MySQLConnectionAbstract.autocommit  s)     E4VH=> rS   c                    | j                   S )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.
        )r   r   s    rT   r  z$MySQLConnectionAbstract.get_warnings  s     !!!rS   c                H    t        |t              st        d      || _        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)r   r  rK  r   r	  s     rT   r  z$MySQLConnectionAbstract.get_warnings  s"     %&677"rS   c                    | j                   S )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`.
        )r   r   s    rT   r  z)MySQLConnectionAbstract.raise_on_warnings  s     &&&rS   c                \    t        |t              st        d      || _        |r|| _        yy)a  Sets 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.
        r  N)r   r  rK  r   r   r	  s     rT   r  z)MySQLConnectionAbstract.raise_on_warnings  s2     %&677"'!&D rS   c                    | j                   S )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.
        )r   r   s    rT   unread_resultz%MySQLConnectionAbstract.unread_result       """rS   c                H    t        |t              st        d      || _        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.
        r  N)r   r  rK  r   r	  s     rT   r  z%MySQLConnectionAbstract.unread_result  s"     %&677#rS   c                R    | j                   j                  | j                        d   S )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.
           )r   get_charset_info_charset_idr   s    rT   	collationz!MySQLConnectionAbstract.collation  s&     ""33D4D4DEaHHrS   c                R    | j                   j                  | j                        d   S )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  r   s    rT   charsetzMySQLConnectionAbstract.charset%  s&     ""++D,<,<=a@@rS   c                    | j                   S )The charset ID utilized during the connection phase.

        If the charset ID hasn't been set, the default charset ID is returned.
        )r  r   s    rT   
charset_idz"MySQLConnectionAbstract.charset_id1  s     rS   c                    | j                   2| j                  t        S | j                  dk  rt        nt        | _         | j                   S )r  )   r   )r`   ri   r$   r%   r   s    rT   r  z#MySQLConnectionAbstract._charset_id9  sR     $##+
 32 ''&0 ,0     rS   c                    || _         y)z9Sets the charset ID utilized during the connection phase.N)r`   r	  s     rT   r  z#MySQLConnectionAbstract._charset_idO  s     "rS   c                `    | j                   j                  | j                        d   }|dv ry|S )az  Returns 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   )utf8mb4utf8mb3binaryutf8r  )r   encodings     rT   python_charsetz&MySQLConnectionAbstract.python_charsetT  s6     &&//0@0@A!D77rS   c                   d}t        |t        t        f      s|t        |j	                  d            t        |t              s|t        d      |rt        |t              r%| j
                  j                  |      \  | _        }}nt        |t              r&| j
                  j                  ||      \  | _        }}nqt        |j	                  d            |r&| j
                  j                  |      \  | _        }}n/t        d   }| j
                  j                  |d      \  | _        }}| j                  d| d| d       | j                  r(| j                  j                  || j
                  	       yy)
a  Sets 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 NoneNr  z)collation should be either string or None)r  zSET NAMES 'z' COLLATE 'r   )character_set)r   rJ  r   rK  r   r   r  r  r"   _execute_queryr   set_charset)r   r  r  err_msgcharset_namecollation_names         rT   set_charset_collationz-MySQLConnectionAbstract.set_charset_collationd  sx   6 @'C:.73FW^^I677)S)i.CHII'3'
 ''88A	$ "GS)
 ''88)L	$ " !	!:;;
 ##44y4I	  ,I6G
 ##44W4M	  	k,{>BRRSTU>>NN&&|4CVCV&W rS   c                    | j                   S )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.
        r   r   s    rT   r\   z$MySQLConnectionAbstract.read_timeout       !!!rS   c                V    | t        |t              r|dk  rt        d      || _        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
            ```
        Nr   6Option read_timeout must be a positive integer or Noner   rJ  r/   r   r   timeouts     rT   r\   z$MySQLConnectionAbstract.read_timeout  s4    2 gs+w{$L  %rS   c                    | j                   S a  
        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.
        r   r   s    rT   r]   z%MySQLConnectionAbstract.write_timeout       """rS   c                V    | t        |t              r|dk  rt        d      || _        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
            ```
        Nr   7Option write_timeout must be a positive integer or Noner   rJ  r/   r   r  s     rT   r]   z%MySQLConnectionAbstract.write_timeout  s4    2 gs+w{$M  &rS   c                     y)zMySQL connection ID.NrR   r   s    rT   connection_idz%MySQLConnectionAbstract.connection_id  r  rS   c                     y)z>Gathers information of the MySQL server before authentication.NrR   r   s    rT   _do_handshakez%MySQLConnectionAbstract._do_handshake  r  rS   c                     y)z)Opens the connection to the MySQL server.NrR   r   s    rT   _open_connectionz(MySQLConnectionAbstract._open_connection
  r  rS   c                "   | j                  | j                         | j                  | _        | j                  r| j                  | _        | j                  r| j                  | _        | j                  r| j                  | j                         yy)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.
        r  N)
r  r  rh   r  rg   r  rf   r  r   r  r   s    rT   _post_connectionz(MySQLConnectionAbstract._post_connection  sn     	""4+;+;"<**??!__DN>> NNDM 2 23 rS   c                     y)a  Disconnects 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()`.
        NrR   r   s    rT   r   zMySQLConnectionAbstract.close  r  rS   z5ClassVar[Callable[['MySQLConnectionAbstract'], None]]
disconnectc                l   |r | j                   d	i | | j                          | j                          |j                  dd      |j                  dd      }}|s|r$| j                  j                  ||      d   | _        | j                  t        j                  z  s| j                          y	 | j                  | j                         y# t        $ r] | j                  d| j                  xs | j                   d       | j                  | j                         | j                  d       Y yw xY w)
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
        r  Nr  r   r  zSET PASSWORD = 'r   z)ALTER USER CURRENT_USER() PASSWORD EXPIRErR   )rW  r  r  r   r   r  r  re   r*   CAN_HANDLE_EXPIRED_PASSWORDSr  r  r-   r  rn   rm   )r   rV  r  r  s       rT   connectzMySQLConnectionAbstract.connect.  s   & DKK!&! JJy$'JJ{D)  i#22CCGYW D !!J$K$KK!!#L**43C3C*D  	L !1$//2ST^^1TTUVW **43C3C*D JK	Ls   0C A#D32D3c                f   d}d}| j                   r9| j                   j                  t        t        j                  j
                        }	 ||k7  rN|dz   }	 | j                          | j                          | j                         rn	 |dkD  rt        |       ||k7  rN|| _        t        rt        | | j"                         yy# t        t        f$ r#}||k(  rd| d| }t        |      |Y d}~hd}~ww xY w# t        $ r/}t        r#t        | |       t        ||       t!        |        d}~ww xY w)a  Attempts 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.
        r   N)r   kindr    z!Can not reconnect to MySQL after z attempt(s): )ra   
start_spanr3   r:   SpanKindCLIENTr  r  is_connectedr.   IOErrorr/   r   r6   r9   r8   r7   rb   )r   attemptsdelaycounterspanrZ  msginterface_errs           rT   	reconnectz!MySQLConnectionAbstract.reconnectd  s9   $ <<<<**)0E0E + D	X%!A+;OO%LLN((* + 19%L X%. 
%dDJJ7 # w' ;(*?z J++.%1  -S1s: +;  	)$5&t];	sB   
C8 0C C8 C5C0+C8 0C55C8 8	D0*D++D0c                     y)a  Reports 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
        NrR   r   s    rT   r  z$MySQLConnectionAbstract.is_connected  r  rS   c                     y)a  Checks 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.
        NrR   )r   r  r  r  s       rT   pingzMySQLConnectionAbstract.ping  r  rS   c                     y)a  Commits 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()
            ```
        NrR   r   s    rT   commitzMySQLConnectionAbstract.commit  r  rS   c                     y)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.
        NrR   )r   bufferedrawpreparedcursor_class
dictionaryr\   r]   s           rT   cursorzMySQLConnectionAbstract.cursor  r  rS   c                     y)zExecutes a query.NrR   r  s     rT   r  z&MySQLConnectionAbstract._execute_query	  r  rS   c                     y)a  Rollbacks 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()
            ```
        NrR   r   s    rT   rollbackz MySQLConnectionAbstract.rollback  r  rS   c                   | j                   rt        d      |rY|j                         j                  dd      j	                         }g d}||vrt        d| d      | j                  d|        |C| j                  d	k  rt        d
| j                   d      |rd}nd}| j                  d|        d}|r|dz  }| j                  |       y)an  Starts 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')
            ```
        zTransaction already in progressr    )zREAD UNCOMMITTEDzREAD COMMITTEDzREPEATABLE READSERIALIZABLEzUnknown isolation level ""z SET TRANSACTION ISOLATION LEVEL N)      r  zMySQL server version z does not support this featurez	READ ONLYz
READ WRITEzSET TRANSACTION zSTART TRANSACTIONz WITH CONSISTENT SNAPSHOT)	r  r2   r   rL  r   rK  r  ri   r  )r   consistent_snapshotisolation_levelreadonlylevellevelsaccess_moder  s           rT   start_transactionz)MySQLConnectionAbstract.start_transaction  s    N "#DEE#))+33C=CCEEF F" #<_<MQ!OPP"B5' JK##i/ +D,@,@+A B+ + 
 )*"2;- @A#00EurS   c                <   | j                         st        d      	 | j                          |s|r| j                         }|r/|j                         D ]  \  }}|j                  d| d|         |r/|j                         D ]  \  }}|j                  d| d|         |j                          yy# t        t        f$ rW | j
                  rt        d      d| j                  | j                  | j                  | j                  | j                         Y w xY w)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.

        Args:
            user_variables: User variables map.
            session_variables: System variables map.

        Raises:
            OperationalError: If not connected.
            InternalError: If there are unread results and InterfaceError on errors.

        Examples:
            ```
            >>> user_variables = {'var1': '1', 'var2': '10'}
            >>> session_variables = {'wait_timeout': 100000, 'sql_mode': 'TRADITIONAL'}
            >>> cnx.reset_session(user_variables, session_variables)
            ```
        zMySQL Connection not availablezYReset session is not supported with compression for MySQL server version 5.7.2 or earlierNzSET @`z` = zSET SESSION `)r  r1   cmd_reset_connectionr0   r  r   cmd_change_userrl   rm   rq   r  r  r   executer   )r   user_variablessession_variablescurr1  r   s         rT   reset_sessionz%MySQLConnectionAbstract.reset_sessionh  s#   <   ""#CDD	%%' .++-C"0"6"6"8 ;JCKK&T% 9:; "3"9"9"; BJCKK-uD @ABIIK / "#67 	~~'<    

  		s   B5 5A#DDr  c                    || _         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     rT   set_converter_classz+MySQLConnectionAbstract.set_converter_class  s      )rS   c                    | j                   S )z5Gets the converter class set for the current session.)r   r   s    rT   r  z'MySQLConnectionAbstract.converter_class  r  rS   c                   |rst        |t              rc| j                  j                  | j                        d   }|| _         ||| j                        | _        | j                  | j                  _	        yt        d      )r%  r   zFConverter class should be a subclass of conversion.MySQLConverterBase.N)
issubclassr,   r   r  r  r   r  r   r   str_fallbackrH  )r   r&  r  s      rT   r  z'MySQLConnectionAbstract.converter_class  sp     I/AB..778H8HI!LL$-D!&|T5E5EFDN*.*F*FDNN'X rS   c                     y)a  Retrieves 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.
        NrR   )r   r  columnsr  	prep_stmtrV  s         rT   get_rowzMySQLConnectionAbstract.get_row  r  rS   c                     y)a  Gets 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.
        NrR   )r   countr  r-  r  r.  rV  s          rT   get_rowsz MySQLConnectionAbstract.get_rows  r  rS   c                     y)a  Changes 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.
        NrR   )r   r  s     rT   cmd_init_dbz#MySQLConnectionAbstract.cmd_init_db  r  rS   c                     y)a  Sends 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
        NrR   )r   r  r  r  raw_as_stringrV  s         rT   r  z!MySQLConnectionAbstract.cmd_query  r  rS   c                     y)aZ  Sends 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
            ```
        NrR   )r   
statementsrV  s      rT   cmd_query_iterz&MySQLConnectionAbstract.cmd_query_iter;  r  rS   c                     y)a  Send 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.
        NrR   )r   optionss     rT   cmd_refreshz#MySQLConnectionAbstract.cmd_refresh^  r  rS   c                     y)a  Closes 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.
        NrR   r   s    rT   cmd_quitz MySQLConnectionAbstract.cmd_quitz  r  rS   c                     y)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.
        NrR   )r   shutdown_types     rT   cmd_shutdownz$MySQLConnectionAbstract.cmd_shutdown  r  rS   c                     y)a  Sends 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.
        NrR   r   s    rT   cmd_statisticsz&MySQLConnectionAbstract.cmd_statistics  r  rS   c                     t        d      )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)r0   rR   rS   rT   cmd_process_infoz(MySQLConnectionAbstract.cmd_process_info  s      I
 	
rS   c                     y)a  Kills 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)
            ```
        NrR   )r   	mysql_pids     rT   cmd_process_killz(MySQLConnectionAbstract.cmd_process_kill  r  rS   c                     y)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.
        NrR   r   s    rT   	cmd_debugz!MySQLConnectionAbstract.cmd_debug  r  rS   c                     y)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.
        NrR   r   s    rT   cmd_pingz MySQLConnectionAbstract.cmd_ping  r  rS   c                     y)a  Changes 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
        NrR   )r   r  r   r  r  	password1	password2	password3oci_config_fileoci_config_profiler>  s              rT   r  z'MySQLConnectionAbstract.cmd_change_user  r  rS   c                     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
        NrR   )r   	statementrV  s      rT   cmd_stmt_preparez(MySQLConnectionAbstract.cmd_stmt_prepare	  r  rS   c                     y)aF  Executes 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
        NrR   )r   statement_iddatarc  r  rV  s         rT   cmd_stmt_executez(MySQLConnectionAbstract.cmd_stmt_execute	  r  rS   c                     y)a  Deallocates 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.
        NrR   r   rW  rV  s      rT   cmd_stmt_closez&MySQLConnectionAbstract.cmd_stmt_closeC	  r  rS   c                     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
        NrR   )r   rW  param_idrX  rV  s        rT   cmd_stmt_send_long_dataz/MySQLConnectionAbstract.cmd_stmt_send_long_dataS	  r  rS   c                     y)a  Resets 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.
        NrR   r[  s      rT   cmd_stmt_resetz&MySQLConnectionAbstract.cmd_stmt_resetp	  r  rS   c                     y)aN  Resets 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`.
        NrR   r   s    rT   r  z,MySQLConnectionAbstract.cmd_reset_connection	  r  rS   returnNone)rd  rV   r   zType[BaseException]r   BaseExceptionr   r   rd  re  )rd  r  )rd  z$List[Tuple[str, BinaryProtocolType]])r   zTuple[str, BinaryProtocolType]rd  re  r   r   rd  r?   )rd  r   rd  rJ  rd  Optional[str])r   r   rd  re  )r   r  rd  re  )rd  r   )r   r   rd  re  )rV  r   rd  re  )r   )rd  r   re  zUnion[str, Callable]rf  rJ  rd  re  )rh  rH   rd  zTuple[int, ...])rd  zOptional[Tuple[int, ...]])r  Union[int, Sequence[int]]rd  rJ  )r  rl  rd  re  )rd  r   )r  rJ  rd  r  )r   zUnion[str, Sequence[int]]rd  re  )r  r   rd  zOptional[RowType]NN)r  rk  r   rk  rd  re  T)r   rJ  rd  re  )r  zOptional[Union[int, str]]r  rk  rd  re  rd  Optional[int]r  rp  rd  re  )r    r   )r  rJ  r  rJ  rd  re  )Fr    r   )r  r  r  rJ  r  rJ  rd  re  )NNNNNNN)r  Optional[bool]r  rr  r  rr  r	  z%Optional[Type['MySQLCursorAbstract']]r
  rr  r\   rp  r]   rp  rd  z'MySQLCursorAbstract')r  r   rd  re  )FNN)r  r  r  rk  r  rr  rd  re  )r   Optional[Dict[str, Any]]r!  rs  rd  re  )r&  Optional[Type[MySQLConverter]]rd  re  )rd  rt  )FNNN)r  r  r-  Optional[List[DescriptionType]]r  rr  r.  Optional[CMySQLPrepStmt]rV  r   rd  z2Tuple[Optional[RowType], Optional[Dict[str, Any]]])NFNNN)r1  rp  r  r  r-  ru  r  rr  r.  rv  rV  r   rd  z.Tuple[List[RowType], Optional[Dict[str, Any]]])r  r   rd  rs  )FFF)r  r   r  rr  r  r  r6  r  rV  r   rd  rs  )r8  r   rV  r   rd  z(Generator[Mapping[str, Any], None, None])r;  rJ  rd  zDict[str, Any])rd  zOptional[bytes]r   )r@  rp  rd  re  )rd  rs  )rG  rJ  rd  rs  )
rY   rY   rY   NrY   rY   rY   rY   rY   rY   )r  r   r   r   r  r   r  rp  rN  r   rO  r   rP  r   rQ  r   rR  r   r>  r   rd  rs  )rT  rq  rV  r   rd  z(Union[Mapping[str, Any], CMySQLPrepStmt])rR   rR   r   )rW  Union[int, CMySQLPrepStmt]rX  zSequence[BinaryProtocolType]rc  r   r  rJ  rV  r   rd  z&Optional[Union[Dict[str, Any], Tuple]])rW  rw  rV  r   rd  re  )
rW  rw  r^  rJ  rX  r   rV  r   rd  rJ  )drN   rO   rP   rQ   r   r   r   r   propertyr   r   r   r   r   r   r   r   r   r   r   r  r   r  setterr  r  rW  rQ  staticmethodrT  rz  r;   r#   r   r  r  rh  r  r  r  r  r  r  r  r  r  rI  r  r  r  r  r  r  r  r  r  r  r  r  r\   r]   r  r  r  r  r   r  __annotations__r  r  r  r  r  r  r  r  r  r#  r'  r  r/  r2  r4  r  r9  r<  r>  rA  rC  rE  rH  rJ  rL  r  rU  rY  r\  r_  ra  r  rR   rS   rT   rV   rV      s   BR)h% ! !	
 
 
 
 & & / /61]
~ORb       ! ! $  $ __' ' % % &  &
 ) ) *  *HXT
6 JK  $8 DG 	   D  2 0)00?OPQ$ R$ 0)00}MN  O  $ $ 
 
   ( 0)00~NO! P!> " " "U "UH	"/ 
 
    
   __ $  & IM % 8E 	 ( 0)00}MN! O! ! !     
 ! ! " " 
# 
# ' ' ' '& # # 
$ 
$ 	I 	I 	A 	A     ! !* " "    UYAX0AXDQAX	AXF 
" 
" % %> 
# 
# & &> #  # M M 8 84    INJEM4Ll58n    .  &  $("#'>B%)&*'+6 6 6 !	6
 <6 #6 $6 %6 
6 6p      $ %*)-#'	H!H 'H !	H
 
HX 486:808 48 
	8t 0)00?PQR) S) % %  $  37".2 1 	
 ,  
< :   $37".2  1	
  ,  
8 @    $#%% % 	%
 % % 
"% %N      
2	   D  6 
 
     
 
   &      !%!"$!#,, , 	,
 , , , , ,  , , 
", ,\   
2	 *  .0!(0( +( 	(
 ( ( 
0( (T 0  
	  0  	
  
 8 0  
	   rS   rV   c                     e Zd ZdZ	 	 	 d$	 	 	 	 	 	 	 d%dZd&dZ	 	 	 	 	 	 	 	 d'dZed(d       Zej                  d)d       Zed(d       Z
e
j                  d)d	       Z
e	 d*	 	 	 	 	 d+d
       Zed,d       Ze	 	 d-	 	 	 	 	 	 	 d.d       Ze	 	 	 	 	 	 d/d       Zed0d       Zed1d2d       Zed3d       Z	 	 d4dZed5d       Zed6d       Zd7dZd8d9dZd:d;dZed<d       Zed=d       Zed(d       Zed>d       Zed=d       Zed?d       Z e e jB                  d            d>d       Z"d@d Z#dAd!Z$dBd"Z%d,d#Z&y)CMySQLCursorAbstractzAbstract cursor class

    Abstract class defining cursor class with method and members
    required by the Python Database API Specification v2.0.
    Nc                p   || _         |6t        |t              st        d      t	        j
                  |      | _         d| _        d| _        d| _        d| _	        d| _
        d| _        g | _        g | _        d| _        d| _        d| _        d| _        || _        || _        d| _        d| _        d| _        y)	z#Defines the MySQL cursor interface.Ni   )errnor   r   r    Frm  )_connectionr   rV   r/   weakrefproxy_description	_rowcount_last_insert_id	_warnings_warning_count	_executed_executed_list_stored_results	arraysize_binaryr   _nextrowr   r   _stmt_partitions_stmt_partition_stmt_map_results)r   
connectionr\   r]   s       rT   r   zMySQLCursorAbstract.__init__	  s     ?I!j*AB$400&}}Z8D=A .26:#$*.+-:<"	
 	 -9-:  	 @D',rS   c                    | S r   rR   r   s    rT   r   zMySQLCursorAbstract.__enter__	  r   rS   c                $    | j                          y r   r   r   s       rT   r   zMySQLCursorAbstract.__exit__	  r   rS   c                    | j                   S )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.
        r  r   s    rT   r\   z MySQLCursorAbstract.read_timeout	  r  rS   c                V    | t        |t              r|dk  rt        d      || _        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
            ```
        Nr   r  r  r  s     rT   r\   z MySQLCursorAbstract.read_timeout	  s4    4 gs+w{$L  %rS   c                    | j                   S r  r  r   s    rT   r]   z!MySQLCursorAbstract.write_timeout	  r  rS   c                V    | t        |t              r|dk  rt        d      || _        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
            ```
        Nr   r  r  r  s     rT   r]   z!MySQLCursorAbstract.write_timeout
  s4    4 gs+w{$M  &rS   c                     y)a  Calls 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.

        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
        NrR   )r   procnameargss      rT   callproczMySQLCursorAbstract.callproc)
  r  rS   c                     y)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.
        NrR   r   s    rT   r   zMySQLCursorAbstract.close]
  r  rS   c                     y)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
            ```
        NrR   )r   	operationparamsmap_resultss       rT   r  zMySQLCursorAbstract.executeh
  r  rS   c                     y)a  Executes 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')
            ```
        NrR   )r   r  
seq_paramss      rT   executemanyzMySQLCursorAbstract.executemany
  r  rS   c                     y)a  Retrieves 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()
            ```
        NrR   r   s    rT   fetchonezMySQLCursorAbstract.fetchone  r  rS   c                     y)a  Fetches 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.
        NrR   )r   sizes     rT   	fetchmanyzMySQLCursorAbstract.fetchmany/  r  rS   c                     y)a  Fetches 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()
            ```
        NrR   r   s    rT   fetchallzMySQLCursorAbstract.fetchall=  r  rS   c              #    K   d}| j                   s| j                  }	 | j                         }| j                   r| j                  n||f | j	                         rA	 | j                         }| j                   r| j                  n||f | j	                         r@yy# t        $ r g }Y }w xY w# t        $ r g }Y Ow xY ww)a  Generates 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)r  rT  r  r/   nextset)r   statement_cached
result_sets      rT   	fetchsetszMySQLCursorAbstract.fetchsetsM  s     r  %%#~~	J #44DNN:J 	 lln !]]_
 #'"8"8>N  lln  	J	 "  
 sQ   C B .C B/ -.C C B,)C +B,,C /B=:C <B==C c                     y)a  Returns 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,)]
            ```
        NrR   r   s    rT   stored_resultsz"MySQLCursorAbstract.stored_results  r  rS   c                     y)a  Makes 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.
        NrR   r   s    rT   r  zMySQLCursorAbstract.nextset  r  rS   c                     yzNot Implemented.NrR   )r   sizess     rT   setinputsizesz!MySQLCursorAbstract.setinputsizes  r  rS   c                     yr  rR   )r   r  columns      rT   setoutputsizez!MySQLCursorAbstract.setoutputsize  r  rS   c                     y)zResets the cursor to defaultNrR   )r   frees     rT   resetzMySQLCursorAbstract.reset  r  rS   c                    | j                   S )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
        )r  r   s    rT   descriptionzMySQLCursorAbstract.description  s    4    rS   c                    | j                   S )a  Returns 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.
        )r  r   s    rT   rowcountzMySQLCursorAbstract.rowcount       ~~rS   c                    | j                   S )a  Returns 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`.
        )r  r   s    rT   	lastrowidzMySQLCursorAbstract.lastrowid  s     ###rS   c                    | j                   S )a  Gets 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'")]
            ```
        r  r   s    rT   warningszMySQLCursorAbstract.warnings  r  rS   c                    | j                   S )zReturns the number of warnings.

        This property returns the number of warnings generated by the
        previously executed operation.

        Returns an integer value.
        )r  r   s    rT   warning_countz!MySQLCursorAbstract.warning_count*  r  rS   c                    | j                   y	 | j                   j                         j                  d      S # t        t        f$ r+ t        t        | j                   j                               cY S w xY w)a  Returns 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.
        Nzutf-8)r  r   rr  r   UnicodeDecodeErrorr   r   r   s    rT   rT  zMySQLCursorAbstract.statement5  sc     >>!	5>>'')0099 23 	5T^^11344	5s   (8 7A21A2r  r{  c                    | j                   S )a  Returns 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'")]
            ```
        r  r   s    rT   fetchwarningsz!MySQLCursorAbstract.fetchwarningsF  r  rS   c                H    t        | d      r| j                  j                  S y)zGets a list of query attributes from the connector's side.

        Returns:
            List of existing query attributes.
        r  N)hasattrr  r   r   s    rT   get_attributesz"MySQLCursorAbstract.get_attributesW  s#     4'##///rS   c                    t        |t              st        d      |t        |t              st        d| d      t	        | d      r| j
                  j                  ||f       yy)a  Adds 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 typeNzObject z$ cannot be converted to a MySQL typer  )r   r   r2   MYSQL_PY_TYPESr  r  r   )r   r   r   s      rT   add_attributez!MySQLCursorAbstract.add_attributea  sl     $$"#KLLZ~%F"% DE  4'//u> (rS   c                    t        |t              st        d      t        | d      r| j                  j                  |      S y)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.
        r  r  N)r   r   r2   r  r  r   r   s     rT   remove_attributez$MySQLCursorAbstract.remove_attributex  s>     $$"#KLL4'##66t<<rS   c                R    t        | d      r| j                  j                          yy)z<Clears the list of query attributes on the connector's side.r  N)r  r  r   r   s    rT   clear_attributesz$MySQLCursorAbstract.clear_attributes  s#    4'..0 (rS   )NNN)r  z!Optional[MySQLConnectionAbstract]r\   rp  r]   rp  rd  re  )rd  r}  rf  ro  rq  )rR   )r  r   r  r   rd  z0Optional[Union[Dict[str, RowItemType], RowType]]rc  )rR   F)r  r   r  zFUnion[Sequence[MySQLConvertibleType], Dict[str, MySQLConvertibleType]]r  r  rd  re  )r  r   r  zPSequence[Union[Sequence[MySQLConvertibleType], Dict[str, MySQLConvertibleType]]]rd  re  )rd  z0Optional[Union[RowType, Dict[str, RowItemType]]])r    )r  rJ  rd  ,List[Union[RowType, Dict[str, RowItemType]]])rd  r  )rd  zYGenerator[tuple[Optional[str], list[Union[RowType, Dict[str, RowItemType]]]], None, None])rd  zIterator[MySQLCursorAbstract])rd  rr  )r  r   rd  r   r   )r  r   r  r   rd  r   rn  )r  r  rd  re  )rd  ru  ri  )rd  zOptional[List[WarningType]]rj  )rd  z.Optional[List[Tuple[str, BinaryProtocolType]]])r   r   r   r?   rd  re  rh  )'rN   rO   rP   rQ   r   r   r   rx  r\   ry  r]   r   r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rT  r;   r#   r   r  r  r  r  r  rR   rS   rT   r}  r}  	  s    9=&*'+	'-5'- $'- %	'-
 
'-R% ! !	
 
 
" 
" % %@ 
# 
# & &@ .011#+1	91 1f    !CC
C C 
C CJ ++
+ 
+ +Z  $    K
KZ  & & &P+ ! !6    	$ 	$    # # 5 5  0)00zJK L ?."1rS   r}  )mrQ   
__future__r   r   rs  r  abcr   r   r   r   r   r	   decimalr
   inspectr   r   typesr   typingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   sslr  r   ImportError	constantsr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   
conversionr+   r,   errorsr-   r.   r/   r0   r1   r2   opentelemetry.constantsr3   r4   r5   r6   opentelemetry.instrumentationr7   r8   r9   r:   _decoratingr;   optionfilesr<   tls_ciphersr=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   utilsrJ   rK   r   r   r   r   rS  rU  rq  floatrJ  r   r  rM   rV   r}  rR   rS   rT   <module>r     sg  > 2 " 	 	  # 4 4        (  	sM"s!
   ;     $ * Q    1 2  O 
 P 
: #  		
^ X#c X#vFz1# z1WJ  		s   *D> >EE