X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=9307633027c31867941f62add1ae588fc1a29ff7;hb=5a27176db6eba187f3f9c253ad2a30f931eeb822;hp=c2d51786cc31d9f072ddbe304f7cb14b870fc998;hpb=5b7cd835e58613831925807ec170705c937b15bb;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index c2d51786..93076330 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -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'] ################################################################################