]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
Fix custom type DebVersion in dbconn.py.
[dak.git] / daklib / dbconn.py
index c2d51786cc31d9f072ddbe304f7cb14b870fc998..9307633027c31867941f62add1ae588fc1a29ff7 100755 (executable)
@@ -64,14 +64,16 @@ from dak_exceptions import NoSourceFieldError
 # Patch in support for the debversion field type so that it works during
 # reflection
 
-class DebVersion(sqltypes.Text):
-    """
-    Support the debversion type
-    """
-
+class DebVersion(sqltypes.TypeEngine):
     def get_col_spec(self):
         return "DEBVERSION"
 
+    def bind_processor(self, dialect):
+        return None
+
+    def result_processor(self, dialect):
+        return None
+
 sa_major_version = sqlalchemy.__version__[0:3]
 if sa_major_version in ["0.5", "0.6"]:
     from sqlalchemy.databases import postgres
@@ -81,7 +83,7 @@ else:
 
 ################################################################################
 
-__all__ = ['IntegrityError', 'SQLAlchemyError']
+__all__ = ['IntegrityError', 'SQLAlchemyError', 'DebVersion']
 
 ################################################################################