]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- add a few missing methods to the cymysql dialect
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Feb 2014 23:16:17 +0000 (18:16 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Feb 2014 23:21:09 +0000 (18:21 -0500)
doc/build/changelog/changelog_08.rst
lib/sqlalchemy/dialects/mysql/cymysql.py

index 1885ddf37a08b9f8c3b08ce0145bc5529e00d7e4..85d7026857d124cb13a448d8dc28023c7a41b29f 100644 (file)
 .. changelog::
     :version: 0.8.5
 
+    .. change::
+        :tags: bug, mysql
+        :pullreq: github:61
+        :versions: 0.9.2
+
+        Some missing methods added to the cymysql dialect, including
+        _get_server_version_info() and _detect_charset().  Pullreq
+        courtesy Hajime Nakagami.
+
     .. change::
         :tags: bug, py3k
         :pullreq: github:63
index 0806f63b4782faa9916f433221a145f866f102f1..18b6eb800eb5994f7e7a0eda260e0b9fec3dfb77 100644 (file)
@@ -56,6 +56,14 @@ class MySQLDialect_cymysql(MySQLDialect_mysqldb):
     def dbapi(cls):
         return __import__('cymysql')
 
+    def _get_server_version_info(self, connection):
+        dbapi_con = connection.connection
+        version = [int(v) for v in dbapi_con.server_version.split('.')]
+        return tuple(version)
+
+    def _detect_charset(self, connection):
+        return connection.connection.charset
+
     def _extract_error_code(self, exception):
         return exception.errno