§
    WøÁió  ã                   óB   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZeZdS )aÛ  

.. dialect:: mysql+pymysql
    :name: PyMySQL
    :dbapi: pymysql
    :connectstring: mysql+pymysql://<username>:<password>@<host>/<dbname>[?<options>]
    :url: https://pymysql.readthedocs.io/

Unicode
-------

Please see :ref:`mysql_unicode` for current recommendations on unicode
handling.

.. _pymysql_ssl:

SSL Connections
------------------

The PyMySQL DBAPI accepts the same SSL arguments as that of MySQLdb,
described at :ref:`mysqldb_ssl`.   See that section for additional examples.

If the server uses an automatically-generated certificate that is self-signed
or does not match the host name (as seen from the client), it may also be
necessary to indicate ``ssl_check_hostname=false`` in PyMySQL::

    connection_uri = (
        "mysql+pymysql://scott:tiger@192.168.0.134/test"
        "?ssl_ca=/home/gord/client-ssl/ca.pem"
        "&ssl_cert=/home/gord/client-ssl/client-cert.pem"
        "&ssl_key=/home/gord/client-ssl/client-key.pem"
        "&ssl_check_hostname=false"
    )


MySQL-Python Compatibility
--------------------------

The pymysql DBAPI is a pure Python port of the MySQL-python (MySQLdb) driver,
and targets 100% compatibility.   Most behavioral notes for MySQL-python apply
to the pymysql driver as well.

é   )ÚMySQLDialect_mysqldbé   )Úlanghelpersc                   ó˜   ‡ — e Zd ZdZdZdZej        d„ ¦   «         Ze	d„ ¦   «         Z
ej        d„ ¦   «         Zd„ Zdˆ fd„	Zˆ fd	„Zd
„ Zˆ xZS )ÚMySQLDialect_pymysqlÚpymysqlTNc                 óx   — 	 t          d¦  «        j        }|j        | _        dS # t          t
          f$ r Y dS w xY w)Nzpymysql.cursorsTF)Ú
__import__ÚcursorsÚSSCursorÚ	_sscursorÚImportErrorÚAttributeError)Úselfr   s     úk/var/www/html/jarvis.com/web/backend/venv/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/pymysql.pyÚsupports_server_side_cursorsz1MySQLDialect_pymysql.supports_server_side_cursors@   sN   € ð	Ý Ð!2Ñ3Ô3Ô;ˆGØ$Ô-ˆDŒNØ�4øÝ�^Ð,ð 	ð 	ð 	Ø�5�5ð	øøøs   ‚ $ ¤9¸9c                 ó    — t          d¦  «        S )Nr   )r
   )Úclss    r   Úimport_dbapiz!MySQLDialect_pymysql.import_dbapiI   s   € å˜)Ñ$Ô$Ð$ó    c                 ó  — 	 t          d¦  «        j        j        }t          j        |j        ¦  «        }	 |j        d         }|dk    o|j         p|j        d         duS # t          $ r Y dS w xY w# t          t          f$ r Y dS w xY w)a  determine if pymysql has deprecated, changed the default of,
        or removed the 'reconnect' argument of connection.ping().

        See #10492 and
        https://github.com/PyMySQL/mysqlclient/discussions/651#discussioncomment-7308971
        for background.

        zpymysql.connectionsr   Ú	reconnecté    FT)r
   ÚconnectionsÚ
Connectionr   Úget_callable_argspecÚpingÚargsÚdefaultsÚ
IndexErrorr   r   )r   r   ÚinspÚreconnect_args       r   Ú_send_false_to_pingz(MySQLDialect_pymysql._send_false_to_pingM   s¿   € ð	Ý#Ø%ñô äœ*ð õ Ô3°J´OÑDÔDˆDðØ $¤	¨!¤�ð %¨Ò3ð ØœÐ%ÐF¨¬°qÔ)9ÀÐ)Fðøõ ð ð ð Ø�u�uðøøøøõ �^Ð,ð 	ð 	ð 	Ø�4�4ð	øøøs"   ‚A0 µA Á
A-Á,A-Á0BÂBc                 óh   — | j         r|                     d¦  «         n|                     ¦   «          dS )NFT)r#   r   )r   Údbapi_connections     r   Údo_pingzMySQLDialect_pymysql.do_pingi   s;   € ØÔ#ð 	$Ø×!Ò! %Ñ(Ô(Ð(Ð(à×!Ò!Ñ#Ô#Ð#àˆtr   c                 ón   •— |€t          d¬¦  «        }t          ¦   «                              ||¬¦  «        S )NÚuser)Úusername)Ú_translate_args)ÚdictÚsuperÚcreate_connect_args)r   Úurlr*   Ú	__class__s      €r   r-   z(MySQLDialect_pymysql.create_connect_argsq   s?   ø€ ØÐ"Ý"¨FÐ3Ñ3Ô3ˆOÝ‰wŒw×*Ò*Ø ð +ñ 
ô 
ð 	
r   c                 óØ   •— t          ¦   «                              |||¦  «        rdS t          || j        j        ¦  «        r)t          |¦  «                             ¦   «         }d|v pd|v S dS )NTzalready closedzconnection was killedF)r,   Úis_disconnectÚ
isinstanceÚdbapiÚErrorÚstrÚlower)r   ÚeÚ
connectionÚcursorÚstr_er/   s        €r   r1   z"MySQLDialect_pymysql.is_disconnectx   so   ø€ Ý‰7Œ7× Ò   J°Ñ7Ô7ð 	Ø�4Ý˜˜4œ:Ô+Ñ,Ô,ð 	Ý˜‘F”F—L’L‘N”NˆEà  EÐ)ÐMÐ-DÈÐ-Mðð �5r   c                 óv   — t          |j        d         t          ¦  «        r|j        d         }|j        d         S )Nr   )r2   r   Ú	Exception)r   Ú	exceptions     r   Ú_extract_error_codez(MySQLDialect_pymysql._extract_error_codeƒ   s4   € Ý�i”n QÔ'­Ñ3Ô3ð 	*Ø!œ qÔ)ˆIØŒ~˜aÔ Ð r   )N)Ú__name__Ú
__module__Ú__qualname__ÚdriverÚsupports_statement_cacheÚdescription_encodingr   Úmemoized_propertyr   Úclassmethodr   r#   r&   r-   r1   r>   Ú__classcell__)r/   s   @r   r   r   :   sÜ   ø€ € € € € Ø€FØ#ÐàÐàÔ"ðð ñ #Ô"ðð ð%ð %ñ „[ð%ð Ô"ðð ñ #Ô"ðð6ð ð ð
ð 
ð 
ð 
ð 
ð 
ð	ð 	ð 	ð 	ð 	ð!ð !ð !ð !ð !ð !ð !r   r   N)Ú__doc__Úmysqldbr   Úutilr   r   Údialect© r   r   ú<module>rM      su   ðð*ð *ðX *Ð )Ð )Ð )Ð )Ð )Ø Ð Ð Ð Ð Ð ðL!ð L!ð L!ð L!ð L!Ð/ñ L!ô L!ð L!ð^ €€€r   