]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add a warning for unported dialects. considered a full blown NotImplementedError...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 6 Dec 2009 23:45:19 +0000 (23:45 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 6 Dec 2009 23:45:19 +0000 (23:45 +0000)
doc/build/dbengine.rst
lib/sqlalchemy/databases/__init__.py
lib/sqlalchemy/dialects/access/base.py
lib/sqlalchemy/dialects/informix/base.py
lib/sqlalchemy/dialects/maxdb/base.py
lib/sqlalchemy/dialects/sybase/base.py
lib/sqlalchemy/engine/default.py

index 156719f71c72b325698371c3e65be33d0f1f1ce6..c1f2c2850f81197996a0b6154263474ec76bbcac 100644 (file)
@@ -56,7 +56,8 @@ Recall that the ``Dialect`` is used to describe how to talk to a specific kind o
 
 Dialects included with SQLAlchemy fall under one of three categories: supported, experimental, and third party.  Supported drivers are those which work against the most common databases available in the open source world, including SQLite, PostgreSQL, MySQL, and Firebird.   Very popular commercial databases which provide easy access to test platforms are also supported, these currently include MSSQL and Oracle.   These dialects are tested frequently and the level of support should be close to 100% for each.
 
-The experimental category is for drivers against less common database platforms, or commercial platforms for which no freely available and easily usable test platform is provided.   These include Access, MaxDB, Informix, and Sybase at the time of this writing.  These are partially-functioning dialects for which the SQLAlchemy project is not able to provide regular test support.  If you're interested in supporting one of these backends, contact the mailing list.
+The experimental category is for drivers against less common database platforms, or commercial platforms for which no freely available and easily usable test platform is provided.   These include Access, MaxDB, Informix, and Sybase at the time of this writing.  These are not-yet-functioning
+or partially-functioning dialects for which the SQLAlchemy project is not able to provide regular test support.  If you're interested in supporting one of these backends, contact the mailing list.
 
 There are also third-party dialects available - currently IBM offers a DB2/Informix IDS dialect for SQLAlchemy.
 
@@ -78,7 +79,7 @@ Downloads for each DBAPI at the time of this writing are as follows:
   - MSAccess:  `pyodbc <http://pyodbc.sourceforge.net/>`_
   - Informix:  `informixdb <http://informixdb.sourceforge.net/>`_
   - Sybase:   TODO
-  - MAXDB:    TODO
+  - MAXDB:    `sapdb <http://www.sapdb.org/sapdbapi.html>`_
 
 * Third Party Dialects
   - DB2/Informix IDS: `ibm-db <http://code.google.com/p/ibm-db/>`_
index 16cabd47f8b8cd179e4a24d25f70861cefa12da0..d7c6d7319c3410f2b270f192bffba89bee1ebdfe 100644 (file)
@@ -17,8 +17,6 @@ from sqlalchemy.dialects.access import base as access
 from sqlalchemy.dialects.sybase import base as sybase
 
 
-
-
 __all__ = (
     'access',
     'firebird',
index ee61190ff4024ea22b78302f29ddcc931b38f37b..f4e30f0bdbb87c060756717fbe4c17ce1ead5cad 100644 (file)
@@ -178,6 +178,8 @@ class AccessDialect(default.DefaultDialect):
     supports_sane_rowcount = False
     supports_sane_multi_rowcount = False
 
+    ported_sqla_06 = False
+    
     def type_descriptor(self, typeobj):
         newobj = types.adapt_type(typeobj, self.colspecs)
         return newobj
index 6565a812fed101097a02d4ce15d66fcb869a1587..9fbfbf011717a2efa950716ee49cdb7382bc5048 100644 (file)
@@ -217,6 +217,8 @@ class InformixDialect(default.DefaultDialect):
     colspecs = colspecs
     ischema_names = ischema_names
 
+    ported_sqla_06 = False
+
     def do_begin(self, connect):
         cu = connect.cursor()
         cu.execute('SET LOCK MODE TO WAIT')
index d5f00dbdd131e26c91ce6ba2a44d4f67654d63fe..9487ed7ed8fc2db7d3f31c07b341b77bfcfc875b 100644 (file)
@@ -805,6 +805,8 @@ class MaxDBDialect(default.DefaultDialect):
     ddl_compiler = MaxDBDDLCompiler
     execution_ctx_cls = MaxDBExecutionContext
 
+    ported_sqla_06 = False
+
     colspecs = colspecs
     ischema_names = ischema_names
     
index cfdbd321ad70be39ac2e8e23250d2ff24d42c8f4..527cecd0386202bb1f59c4651f217fdf87f1b146 100644 (file)
@@ -339,6 +339,8 @@ class SybaseDialect(default.DefaultDialect):
     ddl_compiler = SybaseDDLCompiler
     preparer = SybaseIdentifierPreparer
 
+    ported_sqla_06 = False
+
     schema_name = "dba"
 
     def __init__(self, **params):
index 41470f35998a9b5a32b579b1be815622b2de7662..fecc16b3c74e3811d7f6f2c63f9e240add70f11d 100644 (file)
@@ -70,6 +70,11 @@ class DefaultDialect(base.Dialect):
                  encoding='utf-8', paramstyle=None, dbapi=None,
                  implicit_returning=None,
                  label_length=None, **kwargs):
+                 
+        if not getattr(self, 'ported_sqla_06', True):
+            util.warn(
+                "The %s dialect is not yet ported to SQLAlchemy 0.6" % self.name)
+        
         self.convert_unicode = convert_unicode
         self.assert_unicode = assert_unicode
         self.encoding = encoding