Add types to ischema_names

This commit is contained in:
Konsta Vesterinen
2014-01-14 12:49:07 +02:00
parent e3f56d1841
commit 653c66e0aa

View File

@@ -25,6 +25,7 @@ except ImportError:
pass
import six
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql.base import ischema_names
from sqlalchemy import types
from ..exceptions import ImproperlyConfigured
from .scalar_coercible import ScalarCoercible
@@ -63,6 +64,14 @@ class TSTZRANGE(types.UserDefinedType):
return 'tstzrange'
ischema_names['int4range'] = INT4RANGE
ischema_names['int8range'] = INT8RANGE
ischema_names['numrange'] = NUMRANGE
ischema_names['daterange'] = DATERANGE
ischema_names['tsrange'] = TSRANGE
ischema_names['tstzrange'] = TSTZRANGE
class RangeComparator(types.TypeEngine.Comparator):
@classmethod
def coerce_arg(cls, func):