Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/mysql/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/mysql/__pycache__/gaerdbms.cpython-311.pyc

�

�܋f/
��d�dZddlZddlZddlmZddlmZddlmZd�Z	Gd	�d
e��Z
e
ZdS)a}
.. dialect:: mysql+gaerdbms
    :name: Google Cloud SQL
    :dbapi: rdbms
    :connectstring: mysql+gaerdbms:///<dbname>?instance=<instancename>
    :url: https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide

    This dialect is based primarily on the :mod:`.mysql.mysqldb` dialect with
    minimal changes.

    .. deprecated:: 1.0 This dialect is **no longer necessary** for
        Google Cloud SQL; the MySQLdb dialect can be used directly.
        Cloud SQL now recommends creating connections via the
        mysql dialect using the URL format

        ``mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>``


Pooling
-------

Google App Engine connections appear to be randomly recycled,
so the dialect does not pool connections.  The :class:`.NullPool`
implementation is installed within the :class:`_engine.Engine` by
default.

�N)�warn_deprecated�)�MySQLDialect_mysqldb���NullPoolc�h�tj�dd���d��S)N�SERVER_SOFTWARE�zDevelopment/)�os�environ�get�
startswith���Y/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/mysql/gaerdbms.py�_is_dev_environmentr+s'��
�:�>�>�+�R�0�0�;�;�N�K�K�Krc�F�eZdZed���Zed���Zd�Zd�ZdS)�MySQLDialect_gaerdbmsc��td��ddlm}t��rddlm}|S|j�d��rddlm}|Sddlm	}|S)Nz�Google Cloud SQL now recommends creating connections via the MySQLdb dialect directly, using the URL format mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>r)�apiproxy_stub_map)�
rdbms_mysqldb�rdbms)�rdbms_apiproxy)�rdbms_googleapi)
r�google.appengine.apirrr�apiproxy�GetStub�!google.storage.speckle.python.apirr)�clsrrrrs     r�dbapizMySQLDialect_gaerdbms.dbapi0s���	�
)�	
�	
�	
�	;�:�:�:�:�:�� � �	#�:�:�:�:�:�:� � �
�
'�
/�
/��
8�
8�	#�H�H�H�H�H�H�!�!�I�I�I�I�I�I�"�"rc��tS)Nr)r �urls  r�get_pool_classz$MySQLDialect_gaerdbms.get_pool_classOs	���rc�x�|���}t��sd|d<|jd|d<g|fS)Nr�dsn�instance)�translate_connect_argsr�query)�selfr#�optss   r�create_connect_argsz)MySQLDialect_gaerdbms.create_connect_argsTsF���)�)�+�+��"�$�$�	5��D��K�"�y��4�D����4�x�rc���tjd���t|����}|r*|�d��p|�d��nd}|rt|��SdS)Nz^(\d+)L?:|^\((\d+)L?,r�)�re�compile�match�str�group�int)r*�	exceptionr1�codes    r�_extract_error_codez)MySQLDialect_gaerdbms._extract_error_code]sl���
�3�4�4�:�:�3�y�>�>�J�J��49�B�u�{�{�1�~�~�/����Q����d���	��t�9�9��	�	rN)�__name__�
__module__�__qualname__�classmethodr!r$r,r7rrrrr/sf�������#�#��[�#�<����[���������rr)�__doc__rr/�sqlalchemy.utilr�mysqldbr�poolrrr�dialectrrr�<module>rAs�����8
�	�	�	�	�	�	�	�+�+�+�+�+�+�)�)�)�)�)�)�������L�L�L�4�4�4�4�4�0�4�4�4�n ���r

Hacked By AnonymousFox1.0, Coded By AnonymousFox