관리-도구
편집 파일: mysqldb.cpython-38.pyc
U -?�f% � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ d d lm Z d dlm Z G dd � d e�ZG dd� de�ZG dd� de�Z e ZdS )a� .. dialect:: mysql+mysqldb :name: mysqlclient (maintained fork of MySQL-Python) :dbapi: mysqldb :connectstring: mysql+mysqldb://<user>:<password>@<host>[:<port>]/<dbname> :url: https://pypi.org/project/mysqlclient/ Driver Status ------------- The mysqlclient DBAPI is a maintained fork of the `MySQL-Python <https://sourceforge.net/projects/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. .. _mysqldb_ssl: SSL Connections ---------------- The mysqlclient and PyMySQL DBAPIs accept an additional dictionary under the key "ssl", which may be specified using the :paramref:`_sa.create_engine.connect_args` dictionary:: engine = create_engine( "mysql+mysqldb://scott:tiger@192.168.0.134/test", connect_args={ "ssl": { "ca": "/home/gord/client-ssl/ca.pem", "cert": "/home/gord/client-ssl/client-cert.pem", "key": "/home/gord/client-ssl/client-key.pem" } } ) For convenience, the following keys may also be specified inline within the URL where they will be interpreted into the "ssl" dictionary automatically: "ssl_ca", "ssl_cert", "ssl_key", "ssl_capath", "ssl_cipher", "ssl_check_hostname". An example is as follows:: connection_uri = ( "mysql+mysqldb://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" ) .. seealso:: :ref:`pymysql_ssl` in the PyMySQL dialect 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@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename> Server Side Cursors ------------------- The mysqldb dialect supports server-side cursors. See :ref:`mysql_ss_cursors`. � N� )� MySQLCompiler)�MySQLDialect)�MySQLExecutionContext)�MySQLIdentifierPreparer)�TEXT� )�sql)�utilc @ s e Zd ZdS )�MySQLExecutionContext_mysqldbN��__name__� __module__�__qualname__� r r �Q/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/dialects/mysql/mysqldb.pyr c s r c @ s e Zd ZdS )�MySQLCompiler_mysqldbNr r r r r r g s r c s� e Zd ZdZdZdZdZdZdZdZ e ZeZ eZ� fdd�Zdd� Zejjdd � �Zed d� �Z� fdd �Zdd� Zd!dd�Z� fdd�Zd"dd�Zdd� Zdd� Zdd� Zdd� Z � fdd �Z!� Z"S )#�MySQLDialect_mysqldbZmysqldbT�formatc s<