]> 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:20:16 +0000 (18:20 -0500)
doc/build/changelog/changelog_08.rst
lib/sqlalchemy/dialects/mysql/cymysql.py

index 984ee4c646ecbc3f2efe5e9a2d486e7f718cc789..c159089e2a6fc06dbb12ffcc5a0b3e3cce0c5a5e 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 e81a79b85c4d50a026dcc7ac189e29a388f6a22a..40bbc880ed1683818483572f5c873661c1fb34b3 100644 (file)
@@ -52,6 +52,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