@i+n d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ d d
lm Z d dlm
Z
G d d
e Z G d de Z G d de Z
G d de ZeZdS )a
.. dialect:: mysql+mysqldb
:name: mysqlclient (maintained fork of MySQL-Python)
:dbapi: mysqldb
:connectstring: mysql+mysqldb://:@[:]/
:url: https://pypi.org/project/mysqlclient/
Driver Status
-------------
The mysqlclient DBAPI is a maintained fork of the
`MySQL-Python `_ DBAPI
that is no longer maintained. `mysqlclient`_ supports Python 2 and Python 3
and is very stable.
.. _mysqlclient: https://github.com/PyMySQL/mysqlclient-python
.. _mysqldb_unicode:
Unicode
-------
Please see :ref:`mysql_unicode` for current recommendations on unicode
handling.
Using MySQLdb with Google Cloud SQL
-----------------------------------
Google Cloud SQL now recommends use of the MySQLdb dialect. Connect
using a URL like the following::
mysql+mysqldb://root@/?unix_socket=/cloudsql/:
Server Side Cursors
-------------------
The mysqldb dialect supports server-side cursors. See :ref:`mysql_ss_cursors`.
N )
MySQLCompiler)MySQLDialect)MySQLExecutionContext)MySQLIdentifierPreparer)TEXT )sql)utilc $ e Zd Zed ZdS )MySQLExecutionContext_mysqldbc H t | d r| j S | j j S )N _rowcount)hasattrr cursorrowcount)selfs u/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/mysql/mysqldb.pyr z&MySQLExecutionContext_mysqldb.rowcount> s' 4%% (>!;'' N)__name__
__module____qualname__propertyr r r r
r
= s-
( ( X( ( (r r
c e Zd ZdS )MySQLCompiler_mysqldbNr r r r r r r r F Dr r c e Zd ZdS )MySQLIdentifierPreparer_mysqldbNr r r r r r J r r r c e Zd ZdZdZdZdZdZdZe Z
eZe
Zd fd Zd Zej j d Zed Z fd Zd
ZddZ fd
ZddZd Zd Z eg d Z fdZ xZ!S )MySQLDialect_mysqldbmysqldbTformatFc t t | j di | || _ | j 4t | j d r| | j j nd| _ d S )N__version__r r r r ) superr" __init__server_side_cursorsdbapir _parse_dbapi_versionr&