]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- name all the "sub" dialect components <DB><component>_<dialectname>, [ticket:1738]
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Mar 2010 23:31:30 +0000 (19:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Mar 2010 23:31:30 +0000 (19:31 -0400)
20 files changed:
README.unittests
doc/build/reference/dialects/sybase.rst
lib/sqlalchemy/dialects/firebird/kinterbasdb.py
lib/sqlalchemy/dialects/informix/informixdb.py
lib/sqlalchemy/dialects/maxdb/sapdb.py
lib/sqlalchemy/dialects/mssql/zxjdbc.py
lib/sqlalchemy/dialects/mysql/mysqlconnector.py
lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/oursql.py
lib/sqlalchemy/dialects/mysql/pyodbc.py
lib/sqlalchemy/dialects/mysql/zxjdbc.py
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/oracle/zxjdbc.py
lib/sqlalchemy/dialects/postgresql/pg8000.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/postgresql/pypostgresql.py
lib/sqlalchemy/dialects/postgresql/zxjdbc.py
lib/sqlalchemy/dialects/sqlite/pysqlite.py
lib/sqlalchemy/dialects/sybase/mxodbc.py
lib/sqlalchemy/dialects/sybase/pyodbc.py

index 1149950264bc36dec73dd670475acc169bdd72ad..dee34a106b9d321d38fe1b2b71545e06de59c013 100644 (file)
@@ -132,15 +132,15 @@ Additional steps specific to individual databases are as follows:
 
     A full series of setup assuming sa/master: 
    
-       disk init name="translog", physname="/opt/sybase/data/translog.dat", size="10M"
-       create database sqlalchemy on default log on translog="10M"
-       sp_dboption sqlalchemy, "trunc log on chkpt", true
-       sp_addlogin scott, "tiger7"
-       sp_addlogin test_schema, "tiger7"
-       use sqlalchemy
-       sp_adduser scott
-       sp_adduser test_schema
-       grant all to scott
+        disk init name="translog", physname="/opt/sybase/data/translog.dat", size="10M"
+        create database sqlalchemy on default log on translog="10M"
+        sp_dboption sqlalchemy, "trunc log on chkpt", true
+        sp_addlogin scott, "tiger7"
+        sp_addlogin test_schema, "tiger7"
+        use sqlalchemy
+        sp_adduser scott
+        sp_adduser test_schema
+        grant all to scott
         sp_role "grant", sa_role, scott
 
     Sybase will still freeze for up to a minute when the log becomes
index 1b7651d2cff2a169fb810ecb5573f9b04b6d351f..724656a3041b25621203f2d9f9195e967ef30881 100644 (file)
@@ -2,3 +2,19 @@ Sybase
 ======
 
 .. automodule:: sqlalchemy.dialects.sybase.base
+
+python-sybase notes
+-------------------
+
+.. automodule:: sqlalchemy.dialects.sybase.pysybase
+
+pyodbc notes
+------------
+
+.. automodule:: sqlalchemy.dialects.sybase.pyodbc
+
+mxodbc notes
+------------
+
+.. automodule:: sqlalchemy.dialects.sybase.mxodbc
+
index ca2c561da34d676db5de9ade6638e762a376ecdb..66d001e0c85ec5c710bc663e9c44534e17721900 100644 (file)
@@ -30,13 +30,13 @@ __ http://kinterbasdb.sourceforge.net/dist_docs/usage.html#special_issue_concurr
 from sqlalchemy.dialects.firebird.base import FBDialect, FBCompiler
 
 
-class Firebird_kinterbasdb(FBDialect):
+class FBDialect_kinterbasdb(FBDialect):
     driver = 'kinterbasdb'
     supports_sane_rowcount = False
     supports_sane_multi_rowcount = False
 
     def __init__(self, type_conv=200, concurrency_level=1, **kwargs):
-        super(Firebird_kinterbasdb, self).__init__(**kwargs)
+        super(FBDialect_kinterbasdb, self).__init__(**kwargs)
 
         self.type_conv = type_conv
         self.concurrency_level = concurrency_level
@@ -98,4 +98,4 @@ class Firebird_kinterbasdb(FBDialect):
         else:
             return False
 
-dialect = Firebird_kinterbasdb
+dialect = FBDialect_kinterbasdb
index 722a0f0f4d6dbffd419aaf8d1a2c17fd2e74c8f4..a1305c4db81285d455225aa11874c3a7eb2a9aa2 100644 (file)
@@ -1,16 +1,16 @@
 from sqlalchemy.dialects.informix.base import InformixDialect
 from sqlalchemy.engine import default
 
-class InfoExecutionContext(default.DefaultExecutionContext):
+class InformixExecutionContext_informixdb(default.DefaultExecutionContext):
     def post_exec(self):
         if self.isinsert:
             self._lastrowid = [self.cursor.sqlerrd[1]]
 
 
-class Informix_informixdb(InformixDialect):
+class InformixDialect_informixdb(InformixDialect):
     driver = 'informixdb'
     default_paramstyle = 'qmark'
-    execution_context_cls = InfoExecutionContext
+    execution_context_cls = InformixExecutionContext_informixdb
 
     @classmethod
     def dbapi(cls):
@@ -43,4 +43,4 @@ class Informix_informixdb(InformixDialect):
             return False
 
 
-dialect = Informix_informixdb
+dialect = InformixDialect_informixdb
index 10e61228e94e19ed16aacf85035861ce9cf633da..f363239962ebc3eef6c155d52de7bb5759f0c2bc 100644 (file)
@@ -1,6 +1,6 @@
 from sqlalchemy.dialects.maxdb.base import MaxDBDialect
 
-class MaxDB_sapdb(MaxDBDialect):
+class MaxDBDialect_sapdb(MaxDBDialect):
     driver = 'sapdb'
     
     @classmethod
@@ -14,4 +14,4 @@ class MaxDB_sapdb(MaxDBDialect):
         return [], opts
 
 
-dialect = MaxDB_sapdb
\ No newline at end of file
+dialect = MaxDBDialect_sapdb
\ No newline at end of file
index 28b9547d8344a2d7f6ab801ca4a52f8029a4b65b..b11eb173d58ffc47bafb4c60da25a73f78bfbb15 100644 (file)
@@ -22,12 +22,12 @@ from sqlalchemy.connectors.zxJDBC import ZxJDBCConnector
 from sqlalchemy.dialects.mssql.base import MSDialect, MSExecutionContext
 from sqlalchemy.engine import base
 
-class MS_zxjdbcExecutionContext(MSExecutionContext):
+class MSExecutionContext_zxjdbc(MSExecutionContext):
 
     _embedded_scope_identity = False
 
     def pre_exec(self):
-        super(MS_zxjdbcExecutionContext, self).pre_exec()
+        super(MSExecutionContext_zxjdbc, self).pre_exec()
         # scope_identity after the fact returns null in jTDS so we must
         # embed it
         if self._select_lastrowid and self.dialect.use_scope_identity:
@@ -52,13 +52,13 @@ class MS_zxjdbcExecutionContext(MSExecutionContext):
             self.cursor.execute("SET IDENTITY_INSERT %s OFF" % table)
 
 
-class MS_zxjdbc(ZxJDBCConnector, MSDialect):
+class MSDialect_zxjdbc(ZxJDBCConnector, MSDialect):
     jdbc_db_name = 'jtds:sqlserver'
     jdbc_driver_name = 'net.sourceforge.jtds.jdbc.Driver'
 
-    execution_ctx_cls = MS_zxjdbcExecutionContext
+    execution_ctx_cls = MSExecutionContext_zxjdbc
 
     def _get_server_version_info(self, connection):
         return tuple(int(x) for x in connection.connection.dbversion.split('.'))
 
-dialect = MS_zxjdbc
+dialect = MSDialect_zxjdbc
index 6b3888cb07647df94b530dd27369bc1c147219f3..33c18f6d62946d0617c0320159366500dc90f9da 100644 (file)
@@ -15,13 +15,13 @@ from sqlalchemy.sql import operators as sql_operators
 from sqlalchemy import exc, log, schema, sql, types as sqltypes, util
 from sqlalchemy import processors
 
-class MySQL_mysqlconnectorExecutionContext(MySQLExecutionContext):
+class MySQLExecutionContext_mysqlconnector(MySQLExecutionContext):
 
     def get_lastrowid(self):
         return self.cursor.lastrowid
 
 
-class MySQL_mysqlconnectorCompiler(MySQLCompiler):
+class MySQLCompiler_mysqlconnector(MySQLCompiler):
     def visit_mod(self, binary, **kw):
         return self.process(binary.left) + " %% " + self.process(binary.right)
 
@@ -37,7 +37,7 @@ class _DecimalType(_NumericType):
 class _myconnpyNumeric(_DecimalType, NUMERIC):
     pass
 
-class MySQL_mysqlconnectorIdentifierPreparer(MySQLIdentifierPreparer):
+class MySQLIdentifierPreparer_mysqlconnector(MySQLIdentifierPreparer):
 
     def _escape_identifier(self, value):
         value = value.replace(self.escape_quote, self.escape_to_quote)
@@ -49,7 +49,7 @@ class _myconnpyBIT(BIT):
 
         return None
 
-class MySQL_mysqlconnector(MySQLDialect):
+class MySQLDialect_mysqlconnector(MySQLDialect):
     driver = 'mysqlconnector'
     supports_unicode_statements = True
     supports_unicode_binds = True
@@ -57,10 +57,10 @@ class MySQL_mysqlconnector(MySQLDialect):
     supports_sane_multi_rowcount = True
 
     default_paramstyle = 'format'
-    execution_ctx_cls = MySQL_mysqlconnectorExecutionContext
-    statement_compiler = MySQL_mysqlconnectorCompiler
+    execution_ctx_cls = MySQLExecutionContext_mysqlconnector
+    statement_compiler = MySQLCompiler_mysqlconnector
 
-    preparer = MySQL_mysqlconnectorIdentifierPreparer
+    preparer = MySQLIdentifierPreparer_mysqlconnector
 
     colspecs = util.update_copy(
         MySQLDialect.colspecs,
@@ -128,4 +128,4 @@ class MySQL_mysqlconnector(MySQLDialect):
     def _compat_fetchone(self, rp, charset=None):
         return rp.fetchone()
 
-dialect = MySQL_mysqlconnector
+dialect = MySQLDialect_mysqlconnector
index 8cfd5930f69e6c3d66d8340e8bd830eddbab8fab..038e58a4c30d6c926b386cd63dc18856be1cf553 100644 (file)
@@ -30,7 +30,7 @@ from sqlalchemy.sql import operators as sql_operators
 from sqlalchemy import exc, log, schema, sql, types as sqltypes, util
 from sqlalchemy import processors
 
-class MySQL_mysqldbExecutionContext(MySQLExecutionContext):
+class MySQLExecutionContext_mysqldb(MySQLExecutionContext):
     
     @property
     def rowcount(self):
@@ -40,7 +40,7 @@ class MySQL_mysqldbExecutionContext(MySQLExecutionContext):
             return self.cursor.rowcount
         
         
-class MySQL_mysqldbCompiler(MySQLCompiler):
+class MySQLCompiler_mysqldb(MySQLCompiler):
     def visit_mod(self, binary, **kw):
         return self.process(binary.left) + " %% " + self.process(binary.right)
     
@@ -62,22 +62,22 @@ class _MySQLdbNumeric(_DecimalType, NUMERIC):
 class _MySQLdbDecimal(_DecimalType, DECIMAL):
     pass
 
-class MySQL_mysqldbIdentifierPreparer(MySQLIdentifierPreparer):
+class MySQLIdentifierPreparer_mysqldb(MySQLIdentifierPreparer):
     
     def _escape_identifier(self, value):
         value = value.replace(self.escape_quote, self.escape_to_quote)
         return value.replace("%", "%%")
 
-class MySQL_mysqldb(MySQLDialect):
+class MySQLDialect_mysqldb(MySQLDialect):
     driver = 'mysqldb'
     supports_unicode_statements = False
     supports_sane_rowcount = True
     supports_sane_multi_rowcount = True
 
     default_paramstyle = 'format'
-    execution_ctx_cls = MySQL_mysqldbExecutionContext
-    statement_compiler = MySQL_mysqldbCompiler
-    preparer = MySQL_mysqldbIdentifierPreparer
+    execution_ctx_cls = MySQLExecutionContext_mysqldb
+    statement_compiler = MySQLCompiler_mysqldb
+    preparer = MySQLIdentifierPreparer_mysqldb
     
     colspecs = util.update_copy(
         MySQLDialect.colspecs,
@@ -190,4 +190,4 @@ class MySQL_mysqldb(MySQLDialect):
                 return 'latin1'
 
 
-dialect = MySQL_mysqldb
+dialect = MySQLDialect_mysqldb
index 83db1bc724074b85f39643b99aa71ae786424571..6c8bbcac49fe1518c5fa3d04cad4bc3b3e2e20be 100644 (file)
@@ -46,13 +46,13 @@ class _oursqlBIT(BIT):
         return None
 
 
-class MySQL_oursqlExecutionContext(MySQLExecutionContext):
+class MySQLExecutionContext_oursql(MySQLExecutionContext):
 
     @property
     def plain_query(self):
         return self.execution_options.get('_oursql_plain_query', False)
     
-class MySQL_oursql(MySQLDialect):
+class MySQLDialect_oursql(MySQLDialect):
     driver = 'oursql'
 # Py3K
 #    description_encoding = None
@@ -65,7 +65,7 @@ class MySQL_oursql(MySQLDialect):
 
     supports_sane_rowcount = True
     supports_sane_multi_rowcount = True
-    execution_ctx_cls = MySQL_oursqlExecutionContext
+    execution_ctx_cls = MySQLExecutionContext_oursql
 
     colspecs = util.update_copy(
         MySQLDialect.colspecs,
@@ -249,4 +249,4 @@ class MySQL_oursql(MySQLDialect):
         return rp.first()
 
 
-dialect = MySQL_oursql
+dialect = MySQLDialect_oursql
index 7cb2f36428b3e348d3e912f3a84d4d39685eebfd..5add45b2168a32beee3423031a01c333c7bdeb8a 100644 (file)
@@ -8,7 +8,7 @@ from sqlalchemy.engine import base as engine_base
 from sqlalchemy import util
 import re
 
-class MySQL_pyodbcExecutionContext(MySQLExecutionContext):
+class MySQLExecutionContext_pyodbc(MySQLExecutionContext):
 
     def get_lastrowid(self):
         cursor = self.create_cursor()
@@ -17,16 +17,16 @@ class MySQL_pyodbcExecutionContext(MySQLExecutionContext):
         cursor.close()
         return lastrowid
 
-class MySQL_pyodbc(PyODBCConnector, MySQLDialect):
+class MySQLDialect_pyodbc(PyODBCConnector, MySQLDialect):
     supports_unicode_statements = False
-    execution_ctx_cls = MySQL_pyodbcExecutionContext
+    execution_ctx_cls = MySQLExecutionContext_pyodbc
 
     pyodbc_driver_name = "MySQL"
     
     def __init__(self, **kw):
         # deal with http://code.google.com/p/pyodbc/issues/detail?id=25
         kw.setdefault('convert_unicode', True)
-        super(MySQL_pyodbc, self).__init__(**kw)
+        super(MySQLDialect_pyodbc, self).__init__(**kw)
 
     def _detect_charset(self, connection):
         """Sniff out the character set in use for connection results."""
@@ -54,4 +54,4 @@ class MySQL_pyodbc(PyODBCConnector, MySQLDialect):
         else:
             return None
 
-dialect = MySQL_pyodbc
+dialect = MySQLDialect_pyodbc
index dcb46789ab207370cfce30b9d5f38ad9eae46988..f4cf0013c494c0ca24bf5b73fc3b999893b60894 100644 (file)
@@ -38,7 +38,7 @@ class _ZxJDBCBit(BIT):
         return process
 
 
-class MySQL_zxjdbcExecutionContext(MySQLExecutionContext):
+class MySQLExecutionContext_zxjdbc(MySQLExecutionContext):
     def get_lastrowid(self):
         cursor = self.create_cursor()
         cursor.execute("SELECT LAST_INSERT_ID()")
@@ -47,11 +47,11 @@ class MySQL_zxjdbcExecutionContext(MySQLExecutionContext):
         return lastrowid
 
 
-class MySQL_zxjdbc(ZxJDBCConnector, MySQLDialect):
+class MySQLDialect_zxjdbc(ZxJDBCConnector, MySQLDialect):
     jdbc_db_name = 'mysql'
     jdbc_driver_name = 'com.mysql.jdbc.Driver'
 
-    execution_ctx_cls = MySQL_zxjdbcExecutionContext
+    execution_ctx_cls = MySQLExecutionContext_zxjdbc
 
     colspecs = util.update_copy(
         MySQLDialect.colspecs,
@@ -101,4 +101,4 @@ class MySQL_zxjdbc(ZxJDBCConnector, MySQLDialect):
                 version.append(n)
         return tuple(version)
 
-dialect = MySQL_zxjdbc
+dialect = MySQLDialect_zxjdbc
index 7eb8986648b94215a5a1b50bdef26b7776c85f61..eee2bb1babe36b450fb4a42bf34121679c6ae664 100644 (file)
@@ -207,7 +207,7 @@ colspecs = {
     sqltypes.NVARCHAR : _OracleNVarChar,
 }
 
-class Oracle_cx_oracleCompiler(OracleCompiler):
+class OracleCompiler_cx_oracle(OracleCompiler):
     def bindparam_string(self, name):
         if self.preparer._bindparam_requires_quotes(name):
             quoted_name = '"%s"' % name
@@ -217,7 +217,7 @@ class Oracle_cx_oracleCompiler(OracleCompiler):
             return OracleCompiler.bindparam_string(self, name)
 
     
-class Oracle_cx_oracleExecutionContext(OracleExecutionContext):
+class OracleExecutionContext_cx_oracle(OracleExecutionContext):
     
     def pre_exec(self):
         quoted_bind_names = getattr(self.compiled, '_quoted_bind_names', {})
@@ -301,7 +301,7 @@ class Oracle_cx_oracleExecutionContext(OracleExecutionContext):
 
         return result
 
-class Oracle_cx_oracle_with_unicodeExecutionContext(Oracle_cx_oracleExecutionContext):
+class OracleExecutionContext_cx_oracle_with_unicode(OracleExecutionContext_cx_oracle):
     """Support WITH_UNICODE in Python 2.xx.
     
     WITH_UNICODE allows cx_Oracle's Python 3 unicode handling behavior under Python 2.x.
@@ -313,11 +313,11 @@ class Oracle_cx_oracle_with_unicodeExecutionContext(Oracle_cx_oracleExecutionCon
     
     """
     def __init__(self, *arg, **kw):
-        OracleExecutionContext.__init__(self, *arg, **kw)
+        OracleExecutionContext_cx_oracle.__init__(self, *arg, **kw)
         self.statement = unicode(self.statement)
 
     def _execute_scalar(self, stmt):
-        return super(Oracle_cx_oracle_with_unicodeExecutionContext, self).\
+        return super(OracleExecutionContext_cx_oracle_with_unicode, self).\
                             _execute_scalar(unicode(stmt))
                             
 class ReturningResultProxy(base.FullyBufferedResultProxy):
@@ -342,9 +342,9 @@ class ReturningResultProxy(base.FullyBufferedResultProxy):
         return [tuple(self._returning_params["ret_%d" % i] 
                     for i, c in enumerate(self._returning_params))]
 
-class Oracle_cx_oracle(OracleDialect):
-    execution_ctx_cls = Oracle_cx_oracleExecutionContext
-    statement_compiler = Oracle_cx_oracleCompiler
+class OracleDialect_cx_oracle(OracleDialect):
+    execution_ctx_cls = OracleExecutionContext_cx_oracle
+    statement_compiler = OracleCompiler_cx_oracle
     driver = "cx_oracle"
     colspecs = colspecs
     
@@ -399,7 +399,7 @@ class Oracle_cx_oracle(OracleDialect):
                         "or otherwise be passed as Python unicode.  Plain Python strings "
                         "passed as bind parameters will be silently corrupted by cx_Oracle."
                         )
-            self.execution_ctx_cls = Oracle_cx_oracle_with_unicodeExecutionContext
+            self.execution_ctx_cls = OracleExecutionContext_cx_oracle_with_unicode
             # end Py2K
         else:
             self._cx_oracle_with_unicode = False
@@ -504,4 +504,4 @@ class Oracle_cx_oracle(OracleDialect):
     def do_recover_twophase(self, connection):
         pass
 
-dialect = Oracle_cx_oracle
+dialect = OracleDialect_cx_oracle
index 5b4760ff8a1ec72edde806b988aa8640e651aa8f..d742654a0d0fee70d438484d76ce048bb462848c 100644 (file)
@@ -50,7 +50,7 @@ class _ZxJDBCNumeric(sqltypes.Numeric):
         return process
 
 
-class Oracle_zxjdbcCompiler(OracleCompiler):
+class OracleCompiler_zxjdbc(OracleCompiler):
 
     def returning_clause(self, stmt, returning_cols):
         self.returning_cols = list(expression._select_iterables(returning_cols))
@@ -74,7 +74,7 @@ class Oracle_zxjdbcCompiler(OracleCompiler):
         return 'RETURNING ' + ', '.join(columns) +  " INTO " + ", ".join(binds)
 
 
-class Oracle_zxjdbcExecutionContext(OracleExecutionContext):
+class OracleExecutionContext_zxjdbc(OracleExecutionContext):
 
     def pre_exec(self):
         if hasattr(self.compiled, 'returning_parameters'):
@@ -161,12 +161,12 @@ class ReturningParam(object):
                                                    self.type)
 
 
-class Oracle_zxjdbc(ZxJDBCConnector, OracleDialect):
+class OracleDialect_zxjdbc(ZxJDBCConnector, OracleDialect):
     jdbc_db_name = 'oracle'
     jdbc_driver_name = 'oracle.jdbc.OracleDriver'
 
-    statement_compiler = Oracle_zxjdbcCompiler
-    execution_ctx_cls = Oracle_zxjdbcExecutionContext
+    statement_compiler = OracleCompiler_zxjdbc
+    execution_ctx_cls = OracleExecutionContext_zxjdbc
 
     colspecs = util.update_copy(
         OracleDialect.colspecs,
@@ -177,7 +177,7 @@ class Oracle_zxjdbc(ZxJDBCConnector, OracleDialect):
     )
 
     def __init__(self, *args, **kwargs):
-        super(Oracle_zxjdbc, self).__init__(*args, **kwargs)
+        super(OracleDialect_zxjdbc, self).__init__(*args, **kwargs)
         global SQLException, zxJDBC
         from java.sql import SQLException
         from com.ziclix.python.sql import zxJDBC
@@ -196,7 +196,7 @@ class Oracle_zxjdbc(ZxJDBCConnector, OracleDialect):
         self.DataHandler = OracleReturningDataHandler
 
     def initialize(self, connection):
-        super(Oracle_zxjdbc, self).initialize(connection)
+        super(OracleDialect_zxjdbc, self).initialize(connection)
         self.implicit_returning = connection.connection.driverversion >= '10.2'
 
     def _create_jdbc_url(self, url):
@@ -206,4 +206,4 @@ class Oracle_zxjdbc(ZxJDBCConnector, OracleDialect):
         version = re.search(r'Release ([\d\.]+)', connection.connection.dbversion).group(1)
         return tuple(int(x) for x in version.split('.'))
 
-dialect = Oracle_zxjdbc
+dialect = OracleDialect_zxjdbc
index 079b05530c6c41b1561162c42f910942240efbf6..9824ab104cdbcb5eaf05d0c0429ef255c12ad4d7 100644 (file)
@@ -50,11 +50,11 @@ class _PGNumeric(sqltypes.Numeric):
             else:
                 raise exc.InvalidRequestError("Unknown PG numeric type: %d" % coltype)
 
-class PostgreSQL_pg8000ExecutionContext(PGExecutionContext):
+class PGExecutionContext_pg8000(PGExecutionContext):
     pass
 
 
-class PostgreSQL_pg8000Compiler(PGCompiler):
+class PGCompiler_pg8000(PGCompiler):
     def visit_mod(self, binary, **kw):
         return self.process(binary.left) + " %% " + self.process(binary.right)
 
@@ -65,13 +65,13 @@ class PostgreSQL_pg8000Compiler(PGCompiler):
         return text.replace('%', '%%')
 
 
-class PostgreSQL_pg8000IdentifierPreparer(PGIdentifierPreparer):
+class PGIdentifierPreparer_pg8000(PGIdentifierPreparer):
     def _escape_identifier(self, value):
         value = value.replace(self.escape_quote, self.escape_to_quote)
         return value.replace('%', '%%')
 
     
-class PostgreSQL_pg8000(PGDialect):
+class PGDialect_pg8000(PGDialect):
     driver = 'pg8000'
 
     supports_unicode_statements = True
@@ -80,9 +80,9 @@ class PostgreSQL_pg8000(PGDialect):
     
     default_paramstyle = 'format'
     supports_sane_multi_rowcount = False
-    execution_ctx_cls = PostgreSQL_pg8000ExecutionContext
-    statement_compiler = PostgreSQL_pg8000Compiler
-    preparer = PostgreSQL_pg8000IdentifierPreparer
+    execution_ctx_cls = PGExecutionContext_pg8000
+    statement_compiler = PGCompiler_pg8000
+    preparer = PGIdentifierPreparer_pg8000
     
     colspecs = util.update_copy(
         PGDialect.colspecs,
@@ -105,4 +105,4 @@ class PostgreSQL_pg8000(PGDialect):
     def is_disconnect(self, e):
         return "connection is closed" in str(e)
 
-dialect = PostgreSQL_pg8000
+dialect = PGDialect_pg8000
index 712124288a21e66d5370718ce6ec361092c084f6..48349834d225d5eac75b9599ae135910dd48b55b 100644 (file)
@@ -102,7 +102,7 @@ SERVER_SIDE_CURSOR_RE = re.compile(
     r'\s*SELECT',
     re.I | re.UNICODE)
 
-class PostgreSQL_psycopg2ExecutionContext(PGExecutionContext):
+class PGExecutionContext_psycopg2(PGExecutionContext):
     def create_cursor(self):
         # TODO: coverage for server side cursors + select.for_update()
         
@@ -136,7 +136,7 @@ class PostgreSQL_psycopg2ExecutionContext(PGExecutionContext):
             return base.ResultProxy(self)
 
 
-class PostgreSQL_psycopg2Compiler(PGCompiler):
+class PGCompiler_psycopg2(PGCompiler):
     def visit_mod(self, binary, **kw):
         return self.process(binary.left) + " %% " + self.process(binary.right)
     
@@ -144,19 +144,19 @@ class PostgreSQL_psycopg2Compiler(PGCompiler):
         return text.replace('%', '%%')
 
 
-class PostgreSQL_psycopg2IdentifierPreparer(PGIdentifierPreparer):
+class PGIdentifierPreparer_psycopg2(PGIdentifierPreparer):
     def _escape_identifier(self, value):
         value = value.replace(self.escape_quote, self.escape_to_quote)
         return value.replace('%', '%%')
 
-class PostgreSQL_psycopg2(PGDialect):
+class PGDialect_psycopg2(PGDialect):
     driver = 'psycopg2'
     supports_unicode_statements = False
     default_paramstyle = 'pyformat'
     supports_sane_multi_rowcount = False
-    execution_ctx_cls = PostgreSQL_psycopg2ExecutionContext
-    statement_compiler = PostgreSQL_psycopg2Compiler
-    preparer = PostgreSQL_psycopg2IdentifierPreparer
+    execution_ctx_cls = PGExecutionContext_psycopg2
+    statement_compiler = PGCompiler_psycopg2
+    preparer = PGIdentifierPreparer_psycopg2
 
     colspecs = util.update_copy(
         PGDialect.colspecs,
@@ -191,7 +191,7 @@ class PostgreSQL_psycopg2(PGDialect):
                         return
                 extensions.register_type(extensions.UNICODE, conn)
             pool.add_listener({'first_connect': connect, 'connect':connect})
-        super(PostgreSQL_psycopg2, self).visit_pool(pool)
+        super(PGDialect_psycopg2, self).visit_pool(pool)
         
     def create_connect_args(self, url):
         opts = url.translate_connect_args(username='user')
@@ -211,5 +211,5 @@ class PostgreSQL_psycopg2(PGDialect):
         else:
             return False
 
-dialect = PostgreSQL_psycopg2
+dialect = PGDialect_psycopg2
     
index 87582a6cde76ff8008bb9c8f6d6a203077f848f8..2e7ea201c614eeeac00841595db30d3cf1859b98 100644 (file)
@@ -24,10 +24,10 @@ class PGNumeric(sqltypes.Numeric):
         else:
             return processors.to_float
 
-class PostgreSQL_pypostgresqlExecutionContext(PGExecutionContext):
+class PGExecutionContext_pypostgresql(PGExecutionContext):
     pass
 
-class PostgreSQL_pypostgresql(PGDialect):
+class PGDialect_pypostgresql(PGDialect):
     driver = 'pypostgresql'
 
     supports_unicode_statements = True
@@ -40,7 +40,7 @@ class PostgreSQL_pypostgresql(PGDialect):
     supports_sane_rowcount = True
     supports_sane_multi_rowcount = False
 
-    execution_ctx_cls = PostgreSQL_pypostgresqlExecutionContext
+    execution_ctx_cls = PGExecutionContext_pypostgresql
     colspecs = util.update_copy(
         PGDialect.colspecs,
         {
@@ -66,4 +66,4 @@ class PostgreSQL_pypostgresql(PGDialect):
     def is_disconnect(self, e):
         return "connection is closed" in str(e)
 
-dialect = PostgreSQL_pypostgresql
+dialect = PGDialect_pypostgresql
index 02cce4504cc49b87771dc0f80cff65bbdc2b69b5..a886901c82278bff0a9678d32cc7ff595f2e082d 100644 (file)
@@ -9,11 +9,11 @@ The official Postgresql JDBC driver is at http://jdbc.postgresql.org/.
 from sqlalchemy.connectors.zxJDBC import ZxJDBCConnector
 from sqlalchemy.dialects.postgresql.base import PGDialect
 
-class PostgreSQL_zxjdbc(ZxJDBCConnector, PGDialect):
+class PGDialect_zxjdbc(ZxJDBCConnector, PGDialect):
     jdbc_db_name = 'postgresql'
     jdbc_driver_name = 'org.postgresql.Driver'
 
     def _get_server_version_info(self, connection):
         return tuple(int(x) for x in connection.connection.dbversion.split('.'))
 
-dialect = PostgreSQL_zxjdbc
+dialect = PGDialect_zxjdbc
index 3a9cdcda3366108ff6dcd77ed89d9c2ef863b3dd..b48abbb7d68ebe2d63253542877ccb20586e2325 100644 (file)
@@ -168,7 +168,7 @@ class _SQLite_pysqliteDate(DATE):
         else:
             return DATE.result_processor(self, dialect, coltype)
 
-class SQLite_pysqlite(SQLiteDialect):
+class SQLiteDialect_pysqlite(SQLiteDialect):
     default_paramstyle = 'qmark'
     poolclass = pool.SingletonThreadPool
 
@@ -238,4 +238,4 @@ class SQLite_pysqlite(SQLiteDialect):
     def is_disconnect(self, e):
         return isinstance(e, self.dbapi.ProgrammingError) and "Cannot operate on a closed database." in str(e)
 
-dialect = SQLite_pysqlite
+dialect = SQLiteDialect_pysqlite
index 274ffd99ad1b05d206b127a849c7399396b611f1..14817998fc1cc65a50be9991f9b15296321f0df2 100644 (file)
@@ -11,7 +11,7 @@ from sqlalchemy.connectors.mxodbc import MxODBCConnector
 class SybaseExecutionContext_mxodbc(SybaseExecutionContext):
     pass
 
-class Sybase_mxodbc(MxODBCConnector, SybaseDialect):
+class SybaseDialect_mxodbc(MxODBCConnector, SybaseDialect):
     execution_ctx_cls = SybaseExecutionContext_mxodbc
 
-dialect = Sybase_mxodbc
+dialect = SybaseDialect_mxodbc
index 12d7a21db251715c582e35fef057c21508763575..642ae3219c415a0fced681f665a2ebc3b571f0ce 100644 (file)
@@ -13,7 +13,7 @@ class SybaseExecutionContext_pyodbc(SybaseExecutionContext):
     pass
 
 
-class Sybase_pyodbc(PyODBCConnector, SybaseDialect):
+class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect):
     execution_ctx_cls = SybaseExecutionContext_pyodbc
 
-dialect = Sybase_pyodbc
+dialect = SybaseDialect_pyodbc