# mysql/cymysql.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+cymysql :name: CyMySQL :dbapi: cymysql :connectstring: mysql+cymysql://:@/[?] :url: https://github.com/nakagami/CyMySQL """ from .mysqldb import MySQLDialect_mysqldb class MySQLDialect_cymysql(MySQLDialect_mysqldb): driver = 'cymysql' description_encoding = None @classmethod def dbapi(cls): return __import__('cymysql') def _extract_error_code(self, exception): # Py2K return exception[0] # end Py2K # Py3K #return exception.args[0].args[0] dialect = MySQLDialect_cymysql