o
    G)fЌ                  
   @   s  d Z ddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZmZmZmZ ddlm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mZmZm Z m!Z! dd
l"m#Z# ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z- dZ.z*ddl/Z/ddl/m0Z0 ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= dZ.W n e>y Z? z	e>de? de?dZ?[?ww ddl@mAZA ddlBmCZC eArddlDmEZEmFZF G dd deZGdS )z'Connection class using the C Extension.    N)
AnyBinaryIODictListNoReturnOptionalSequenceTupleTypeUnion   )version)CMySQLPrepStmtMySQLConnectionAbstract)
ClientFlag	FieldFlag
ServerFlagShutdownType)MySQLConverter)InterfaceErrorInternalErrorOperationalErrorProgrammingErrorget_mysql_exception)MySQLProtocol)CextEofPacketTypeCextResultTypeDescriptionTypeParamsSequenceOrDictTypeRowTypeStatsPacketType
StrOrBytes)import_objectF)MySQLInterfaceError)CMySQLCursorCMySQLCursorBufferedCMySQLCursorBufferedDictCMySQLCursorBufferedNamedTupleCMySQLCursorBufferedRawCMySQLCursorDictCMySQLCursorNamedTupleCMySQLCursorPreparedCMySQLCursorPreparedDictCMySQLCursorPreparedNamedTupleCMySQLCursorPreparedRawCMySQLCursorRawTz2MySQL Connector/Python C Extension not available ())OTEL_ENABLED)with_context_propagation)end_spanrecord_exception_eventc                       s*  e Zd ZdZdeddf fddZdddZdd	d
Zede	fddZ
deddfddZddeddfddZedefddZejdeddfddZedefddZejdeddfddZedefddZdddZdddZeZdefd d!Zdefd"d#Zdd'ed(e	d)e	ddfd*d+Zd,eddfd-d.Zd/edee fd0d1Zedee	 fd2d3Z		$			dd4ee	 d5ed6eee   d7ee d8ee! de"ee ee# f fd9d:Z$	$			dd5ed6eee   d7ee d8ee! de"ee ee# f f
d;d<Z%dee fd=d>Z&dd?d@Z'ddAdBZ(ddCdDZ)dEeddfdFdGZ*	dd8ee! de+fdHdIZ,dee# fdJdKZ-dLe.de!fdMdNZ/e0dOe!dPedee1e#e+f  fdQdRZ2dOe!ddfdSdTZ3dOe!ddfdUdVZ4e0		$	$dd/ed7ee dWedXedee1e#e+f  f
dYdZZ5e5Z6						ddWee d7ee d[ee d\ee7e8  d]ee d^ee de8fd_d`Z9ede	fdadbZ:ede	fdcddZ;edefdedfZ<edefdgdhZ=edefdidjZ>dke?de1e@e. eAee.f f fdldmZBddndoZC	p	p	p	q	p	p	p		ddredsedEed,e	dteduedvedwee dxee ddfdydzZDdefd{d|ZEd}e	dee# fd~dZFdddZGddee	 ddfddZHdeIfddZJde	ddfddZKdeLfddZMdeLfddZNdedeLfddZOdOe!de	dePdeLfddZQdd[eddfddZR		ddeeAeef  deeAeef  ddfddZS  ZTS )CMySQLConnectionz6Class initiating a MySQL Connection using Connector/C.kwargsreturnNc                    s   t stdd| _g | _tjtjtjt	j
ddd| _t dkr7tj| js7tjdr4dnd| _d| _t   |rYz| jd	i | W dS  tyX   |    w dS )
Initializationz0MySQL Connector/Python C Extension not availableNmysqlvendorpluginLinuxz/usr/lib64/mysql/pluginz/usr/lib/mysql/plugin )HAVE_CMYSQLRuntimeError_cmysql_columnsospathjoindirnameabspath_mysql_connector__file___plugin_dirplatformsystemexists	convertersuper__init__connect	Exceptionclose)selfr6   	__class__r=   \/var/www/html/flask-app/venv/lib/python3.12/site-packages/mysql/connector/connection_cext.pyrO   p   s6   

zCMySQLConnection.__init__c              
   C   sZ   t jd}|d dkrd}nd}| jd|ddd	 t jdd
 D t d dS )z!Add default connection attributes r   GPLv2zGPL-2.0
Commercialzmysql-connector-python.c                 S   s   g | ]}t |qS r=   )str).0xr=   r=   rV   
<listcomp>   s    z<CMySQLConnection._add_default_conn_attrs.<locals>.<listcomp>   )_connector_name_connector_license_connector_version_source_hostN)	r   LICENSEsplit_conn_attrsupdaterD   VERSIONsocketgethostname)rS   license_chunksclient_licenser=   r=   rV   _add_default_conn_attrs   s   z(CMySQLConnection._add_default_conn_attrsc              	   C   sT   | j  | j  | j  dddd| j  d| _| | jd | _| j	| j dS )z<Gather information of the MySQL server before authenticationN)protocolserver_version_originalserver_threadidcharsetserver_statusauth_plugin	auth_datacapabilitiesro   )
r@   get_proto_infoget_server_info	thread_idst_server_capabilities
_handshake_check_server_version_server_version_character_setset_mysql_versionrS   r=   r=   rV   _do_handshake   s   zCMySQLConnection._do_handshakec                 C   
   | j  S )z6Returns the server status attribute of MYSQL structure)r@   st_server_statusr   r=   r=   rV   _server_status      
zCMySQLConnection._server_statusrC   c                 C   s   | j r| j | dS dS )zJset local_infile_in_path

        Set allow_local_infile_in_path.
        N)r@   !set_load_data_local_infile_option)rS   rC   r=   r=   rV   set_allow_local_infile_in_path   s   z/CMySQLConnection.set_allow_local_infile_in_pathTvaluec                 C   s2   || _ | jr| j| | jr| j| dS dS )zuToggle unicode mode

        Set whether we return string fields as unicode or not.
        Default is True.
        N)_use_unicoder@   use_unicoderM   set_unicoderS   r   r=   r=   rV   r      s   zCMySQLConnection.set_unicodec                 C   s   |  dd }|dkS )z#Get whether autocommit is on or offzSELECT @@session.autocommitr   r   
info_queryr   r=   r=   rV   
autocommit   s   zCMySQLConnection.autocommitc              
   C   sH   z| j | || _W dS  ty# } zt|j|j|jd|d}~ww )zToggle autocommitmsgerrnosqlstateN)r@   r   _autocommitr#   r   r   r   r   rS   r   errr=   r=   rV   r      s   c                 C   s   |  dd S )zGet the current databasezSELECT DATABASE()r   r   r   r=   r=   rV   database   s   zCMySQLConnection.databasec              
   C   B   z	| j | W dS  ty  } zt|j|j|jd|d}~ww )zSet the current databaser   Nr@   	select_dbr#   r   r   r   r   r   r=   r=   rV   r      s   c                 C   s   t | jtj@ S )z'MySQL session has started a transaction)boolr   r   STATUS_IN_TRANSr   r=   r=   rV   in_transaction   s   zCMySQLConnection.in_transactionc                 C   s\  | j | jd }tj| j| j|| jpd| j| j	| j
d| _| tjs'i | _| jp,| j}i d| jd| jd| jd| jd| jd| jd	| jd
| jd| jd| jd| jddd| jd| jd| jd| jd| j dt!|t"r{t#|n|i}| j$%d}|d ur|j&dd d'|}| j$%dd ur| j$%dd }| j$%dd }nd }d }|d urd|v r|sd}| j(s|)| j$%d| j$%d| j$%d|||| j$%d pd!| j$%d"pd!| j(d#	 t*j+d$kr| j,d%krd|d&< z| jj-d(i | | j.| j_/| j0r| j.| j0_1W n t2y' } zt3|j4|j5|j6d'|d }~ww | 7  d S ))Nr   )bufferedrawcharset_nameconnection_timeoutr   rs   
plugin_dirhostuserpassword	password1	password2	password3r   portclient_flagsunix_socketcompressssl_disabledT
conn_attrslocal_infileload_data_local_diroci_config_fileoci_config_profilefido_callbacktls_versions)reverse,tls_ciphersuitesr   zTLSv1.3TLS_AES_256_GCM_SHA384cacertkeyverify_certFverify_identity)	ssl_cassl_certssl_keyssl_cipher_suitesr   tls_cipher_suitesssl_verify_certssl_verify_identityr   ntMySQLKerberosAuthPluginuse_kerberos_gssapir   r=   )8r}   get_info_charset_idrG   MySQL	_buffered_raw_connection_timeoutr   _auth_pluginrI   r@   isset_client_flagr   CONNECT_ARGSrf   _webauthn_callback_fido_callback_host_user	_password
_password1
_password2
_password3	_database_port_client_flags_unix_socket	_compress_allow_local_infile_allow_local_infile_in_path_oci_config_file_oci_config_profile
isinstancer[   r"   _sslgetsortrD   _ssl_disabledrg   rB   name_auth_plugin_classrP   _converter_str_fallbackconverter_str_fallbackrM   str_fallbackr#   r   r   r   r   r   )rS   r   r   
cnx_kwargsr   ssl_ciphersuitesr   r   r=   r=   rV   _open_connection   s   
	









z!CMySQLConnection._open_connectionc              
   C   s   | j r| j  rt| j t d  | jsdS z7z|   | j  W n tyB } zt	r3t| j | t
|j|j|jd|d}~ww W t	rMt| j  dS dS t	rWt| j  w w )z Disconnect from the MySQL serverr   Nr   )_spanis_recordingr4   sysexc_infor@   free_resultrR   r#   r1   r   r   r   r   r3   )rS   r   r=   r=   rV   rR   N  s.   zCMySQLConnection.closec                 C   s   | j   S )z8Return True if the connection to MySQL Server is closed.)r@   	connectedr   r=   r=   rV   	is_closede     zCMySQLConnection.is_closedc                 C   s   | j r|   | j  S dS )z;Reports whether the connection to MySQL Server is availableF)r@   handle_unread_resultpingr   r=   r=   rV   is_connectedi  s   
zCMySQLConnection.is_connectedFr   r   	reconnectattemptsdelayc                 C   sP   |    z| j }W n	 ty   Y nw |rdS |r$| j||d dS td)a  Check 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. Use
        the is_connected()-method if you just want to check the connection
        without raising an error.

        Raises InterfaceError on errors.
        N)r   r   z$Connection to MySQL is not available)r   r@   r   AttributeErrorr   r   )rS   r   r   r   r   r=   r=   rV   r   q  s   zCMySQLConnection.pingrq   c                 C   s   | j | dS )z;Sets the default character set name for current connection.N)r@   set_character_set)rS   rq   r=   r=   rV   set_character_set_name  s   z'CMySQLConnection.set_character_set_namequeryc              
   C   s~   d}z%| j | | j jr | j  }| j  r | j   td| j   W |S  ty> } zt|j|j	|j
d|d}~ww )z%Send a query which only returns 1 rowr=   z'Query should not return more than 1 rowr   N)r@   r   have_result_set	fetch_rowr   r   r#   r   r   r   r   )rS   r   	first_rowr   r=   r=   rV   r     s$   


zCMySQLConnection.info_queryc                 C   s"   z| j  W S  ty   Y dS w )zMySQL connection IDN)r@   rx   r#   r   r=   r=   rV   connection_id  s   zCMySQLConnection.connection_idcountbinarycolumnsr   	prep_stmtc              
   C   s  |r|j n| j}| jr|std|du r| j}g }|dur&|dkr&tdd}z||r.|jn| jj}	| jr;| jd |	 }
|
r|| jsg| jrgt	|
}
t
|
D ]\}}|sb| j| j| |
| |
|< qNt|
}
||
 |d7 }|rw||krwn|	 }
|
s@|
s| |d }|r|  d| _n|   nd}W ||fS W ||fS W ||fS  ty } z|r|  tt|||   t|j|j|jd	|d}~ww )
z8Get all or a subset of rows returned by the MySQL serverzNo result set availableNr   z$count should be 1 or higher, or NoneTr   eofFr   )r   unread_resultr@   r   r   r   r  rM   r   list	enumerate	to_pythonrA   tupleappendfetch_eof_columnsr   _unread_resultr#   r   r[   r   r   r   r   )rS   r  r  r  r   r  r	  rowscounterr  rowi__eofr   r=   r=   rV   get_rows  sl   	



zCMySQLConnection.get_rowsc                 C   sJ   z| j d||||d\}}|r|d |fW S d|fW S  ty$   Y dS w )z.Get the next rows returned by the MySQL serverr   )r  r  r  r   r  r   NNN)r  
IndexError)rS   r  r  r   r  r  r  r=   r=   rV   get_row  s   

zCMySQLConnection.get_rowc                 C   s   | j r| j   | j  S dS )zReads the next resultN)r@   consume_resultnext_resultr   r=   r=   rV   r    s   

zCMySQLConnection.next_resultc                 C   s   | j r
| j   dS dS )zFrees the resultN)r@   r   r   r=   r=   rV   r     s   zCMySQLConnection.free_resultc                 C   s    | j r|   | j   dS dS )zCommit current transactionN)r@   r   commitr   r=   r=   rV   r    s   zCMySQLConnection.commitc                 C   s"   | j r| j   | j   dS dS )zRollback current transactionN)r@   r  rollbackr   r=   r=   rV   r    s   
zCMySQLConnection.rollbackr   c              
   C   r   )zChange the current databaser   Nr   )rS   r   r   r=   r=   rV   cmd_init_db  s   zCMySQLConnection.cmd_init_dbc                 C   s   |r|j n| jj }|std|r| n| j }g | _|D ]'}| j|d t|d ddddt|d  tj@ t|d t|d f	 q| j	| j
 d| jdS )	z Fetch EOF and column informationNo result set      N	      )status_flagwarning_count)r  r  )r   r@   r   fetch_fieldsrA   r  intr   NOT_NULLr   st_warning_count)rS   r  r   fieldscolr=   r=   rV   r  %  s0   


z"CMySQLConnection.fetch_eof_columnsc                 C   s4   | j r| j  | j  | j  | j  | jdS dS )z Fetch EOF and status information)r&  field_count	insert_idaffected_rowsrr   N)r@   r*  st_field_countr.  r/  r   r   r=   r=   rV   fetch_eof_statusH  s   z!CMySQLConnection.fetch_eof_status	statementc              
   C   sT   | j stdz| j |}| j|_t|W S  ty) } ztt||d}~ww )zPrepares the SQL statementMySQL Connection not availableN)	r@   r   stmt_preparer   r   r   r#   r   r[   )rS   r2  stmtr   r=   r=   rV   cmd_stmt_prepareU  s   
z!CMySQLConnection.cmd_stmt_preparestatement_idargsc              
   G   sh   z|j |d| ji W n ty } ztt||d}~ww g | _|js,d| _|  S d| _| 	|S )zExecutes the prepared statementquery_attrsNFT)
stmt_executer9  r#   r   r[   rA   r   r  r1  r  )rS   r7  r8  r   r=   r=   rV   cmd_stmt_executea  s   
z!CMySQLConnection.cmd_stmt_executec                 C      | j rtd|  dS )zCloses the prepared statementUnread result foundN)r  r   
stmt_closerS   r7  r=   r=   rV   cmd_stmt_closet     zCMySQLConnection.cmd_stmt_closec                 C   r<  )zResets the prepared statementr=  N)r  r   
stmt_resetr?  r=   r=   rV   cmd_stmt_reset}  rA  zCMySQLConnection.cmd_stmt_resetr   raw_as_stringc              
   C   s   |    |du r| j}zt|ts|d}| jj||||| jd W n: ty: } zt	|j
|j|jd|d}~w ty] } z| jrG| jn| j d| j }td|dfd|d}~ww g | _| jjsi|  S |  S )	z Send a query to the MySQL serverNzutf-8)r   r   rD  r9  )r   r   :i  zConnection not available.)r   values)r   r   r   bytesencoder@   r   r9  r#   r   r   r   r   r   r   r   r   r   rA   r   r1  r  )rS   r   r   r   rD  r   addrr=   r=   rV   	cmd_query  sD   	


zCMySQLConnection.cmd_querypreparedcursor_class
dictionarynamed_tuplec                    s  |  | |  std|durt|tstd|| S |p"| j}|p'| j}d|du r2dO |du r:dO |du rBdO |du rJd	O |du rRd
O ttt	t
ttttttttd}z| | W S  ty   d tdd fddtdD  dw )a  Instantiates and returns a cursor using C Extension

        By default, 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 dictionary or named tuple.

        Dictionary and namedtuple 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_cext.CMySQLCursor.

        Raises ProgrammingError when cursor_class is not a subclass of
        CursorBase. Raises ValueError when cursor is not available.

        Returns instance of CMySQLCursor or subclass.

        :param buffered: Return a buffering cursor
        :param raw: Return a raw cursor
        :param prepared: Return a cursor which uses prepared statements
        :param cursor_class: Use a custom cursor class
        :param dictionary: Rows are returned as dictionary
        :param named_tuple: Rows are returned as named tuple
        :return: Subclass of CMySQLCursor
        :rtype: CMySQLCursor or subclass
        MySQL Connection not available.Nz=Cursor class needs be to subclass of cursor_cext.CMySQLCursorr   Tr      r!  r"     )r   r   rP  r_   r!     r"  r#  rQ           )r   r   rM  rN  rK  z*Cursor not available with given criteria: z, c                    s$   g | ]}d |> @ dkr | qS )r   r   r=   )r\   r  r8  cursor_typer=   rV   r^     s   $ z+CMySQLConnection.cursor.<locals>.<listcomp>rR  )r   r   r   
issubclassr$   r   r   r   r%   r/   r(   r)   r&   r*   r'   r+   r.   r,   r-   KeyError
ValueErrorrD   range)rS   r   r   rK  rL  rM  rN  typesr=   rV  rV   cursor  s^   
%


zCMySQLConnection.cursorc                 C   s   | j jstd| j  S )z,Returns number of rows of current result setr   )r@   r   r   num_rowsr   r=   r=   rV   r^    s   
zCMySQLConnection.num_rowsc                 C   s   | j sdS | j  S )zReturns number of warningsr   )r@   r&  r   r=   r=   rV   r&    s   
zCMySQLConnection.warning_countc                 C   s   | j sdS | j jS )z"Check if a result set is availableF)r@   r   r   r=   r=   rV   result_set_available  s   z%CMySQLConnection.result_set_availablec                 C   s   | j S )z)Check if there are unread results or rows)r_  r   r=   r=   rV   r	    s   zCMySQLConnection.unread_resultc                 C   r   )zCheck if there are more results)r@   more_resultsr   r=   r=   rV   r`  #  r   zCMySQLConnection.more_resultsparamsc                    s   g }t |ttfr jr fdd|D }|S  jj| }|S t |tr[i } jrF| D ]\}} j j	 j
| j||< q-|S | D ]\}} j|d ||< qJ|S tdt|j d| d)zPrepare parameters for statements

        This method is use by cursors to prepared parameters found in the
        list (or tuple) params.

        Returns dict.
        c              	      s,   g | ]} j  j  j | jqS r=   )rM   quoteescapeto_mysql	_sql_mode)r\   r   r   r=   rV   r^   5  s    z6CMySQLConnection.prepare_for_mysql.<locals>.<listcomp>r   zCould not process parameters: (z)), it must be of type list, tuple or dict)r   r
  r  rM   r@   convert_to_mysqldictitemsrb  rc  rd  re  r   type__name__)rS   ra  resultr   r   r=   r   rV   prepare_for_mysql(  s2   



z"CMySQLConnection.prepare_for_mysqlc                 C   s   | j   dS )zlConsume the current result

        This method consume the result by reading (consuming) all rows.
        N)r@   r  r   r=   r=   rV   consume_resultsS  s   z CMySQLConnection.consume_results -   usernamer   r   r   r   r   r   c
              
   C   sf   z| j ||||||||	 W n ty& }
 zt|
j|
j|
jd|
d}
~
ww || _|| _| 	  dS )z!Change the current logged in userr   N)
r@   change_userr#   r   r   r   r   r   r   _post_connection)rS   rq  r   r   rq   r   r   r   r   r   r   r=   r=   rV   cmd_change_userZ  s,   z CMySQLConnection.cmd_change_userc                 C   s   | j  }|r|   |S )zResets the session state without re-authenticating

        Reset command only works on MySQL server 5.7.3 or later.
        The result is True for a successful reset otherwise False.

        Returns bool
        )r@   reset_connectionrs  )rS   resr=   r=   rV   cmd_reset_connection|  s   
z%CMySQLConnection.cmd_reset_connectionoptionsc              
   C   sN   z|    | j| W |  S  ty& } zt|j|j|jd|d}~ww )z,Send the Refresh command to the MySQL serverr   N)	r   r@   refreshr#   r   r   r   r   r1  )rS   rx  r   r=   r=   rV   cmd_refresh  s   zCMySQLConnection.cmd_refreshc                 C   s   |    dS )z,Close the current connection with the serverN)rR   r   r=   r=   rV   cmd_quit  r   zCMySQLConnection.cmd_quitshutdown_typec              
   C   s|   | j std|rt|std|}ntj}z| j | W n ty7 } zt|j	|j
|jd|d}~ww |   dS )zShut 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.
        r3  zInvalid shutdown typer   N)r@   r   r   r   r   SHUTDOWN_DEFAULTshutdownr#   r   r   r   r   rR   )rS   r|  levelr   r=   r=   rV   cmd_shutdown  s$   
zCMySQLConnection.cmd_shutdownc              
   C   sX   |    z| j }t j|ddW S  ttfy+ } zt|j|j	|j
d|d}~ww )z'Return statistics from the MySQL serverF)with_headerr   N)r   r@   statr   parse_statisticsr#   r   r   r   r   r   )rS   r  r   r=   r=   rV   cmd_statistics  s   
zCMySQLConnection.cmd_statistics	mysql_pidc                 C   s&   t |ts	td| d|  dS )zKill a MySQL processzMySQL PID must be intzKILL N)r   r(  rZ  rJ  )rS   r  r=   r=   rV   cmd_process_kill  s   
z!CMySQLConnection.cmd_process_killc                 C      t )zSend the DEBUG commandNotImplementedErrorr   r=   r=   rV   	cmd_debug     zCMySQLConnection.cmd_debugc                 C   r  )zSend the PING commandr  r   r=   r=   rV   cmd_ping  r  zCMySQLConnection.cmd_ping
statementsc                 C   r  )z/Send one or more statements to the MySQL serverr  )rS   r  r=   r=   rV   cmd_query_iter  r  zCMySQLConnection.cmd_query_iterparam_iddatac                 C   r  )zSend data for a columnr  )rS   r7  r  r  r=   r=   rV   cmd_stmt_send_long_data  s   z(CMySQLConnection.cmd_stmt_send_long_datac                 C   s6   |du r| j n| j}| jr|   dS |rtddS )z'Check whether there is an unread resultTr=  N)r  r	  can_consume_resultsrn  r   )rS   rK  r	  r=   r=   rV   r     s   z%CMySQLConnection.handle_unread_resultuser_variablessession_variablesc                 C   s   |   std|  s2z| | j| j| j| j| j| j	| j
| j| j	 W n ty1   |   Y nw |s6|rl|  }|rP| D ]\}}|d| d|f q@|rf| D ]\}}|d| d|f qV|  dS dS )a  Clears the current active session

        This method resets the session state, if the MySQL server is 5.7.3
        or later active session will be reset without re-authenticating.
        For other server versions session will be reset by re-authenticating.

        It is possible to provide a sequence of variables and their values to
        be set after clearing the session. This is possible for both user
        defined variables and session variables.
        This method takes two arguments user_variables and session_variables
        which are dictionaries.

        Raises OperationalError if not connected, InternalError if there are
        unread results and InterfaceError on errors.
        rO  zSET @`z` = %szSET SESSION `N)r   r   rw  rt  r   r   r   r   r   r   r   r   r   r   r   r]  ri  executerR   )rS   r  r  curr   r   r=   r=   rV   reset_session  s8   zCMySQLConnection.reset_session)r7   N)T)Fr   r   )NFNNN)FNNN)N)NFF)NNNNNN)	ro  ro  ro  rp  ro  ro  ro  NN)Fr  )Urk  
__module____qualname____doc__r   rO   rm   r   propertyr(  r   r[   r   r   r   r   setterr   r   r   rR   
disconnectr   r   r   r   r!   r   r   r   r  r   r   r   r	   r   r  r  r  r   r  r  r  r   r  r1  rG  r6  r2   r   r;  r@  rC  rJ  _execute_queryr
   r$   r]  r^  r&  r_  r	  r`  r   r   r   rm  rn  rt  rw  rz  r{  r  r    r  r  r   r  r  r  r   r  r   r  __classcell__r=   r=   rT   rV   r5   m   s   
!
	
	

[

A






#
	
	(

U

+		

"

	
r5   )Hr  rB   rJ   ri   r   typingr   r   r   r   r   r   r   r	   r
   r   ro  r   	abstractsr   r   	constantsr   r   r   r   
conversionr   errorsr   r   r   r   r   rn   r   r\  r   r   r   r   r   r    r!   utilsr"   r>   rG   r#   cursor_cextr$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   ImportErrorexcopentelemetry.constantsr1   !opentelemetry.context_propagationr2   opentelemetry.instrumentationr3   r4   r5   r=   r=   r=   rV   <module>   sB   0$	8
