summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/default.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-01-18 03:00:05 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-01-18 03:00:05 +0000
commit9680e6483f4a811e147dd75bf3f5ccab989f01e0 (patch)
tree55d13b9a50e139561b127cde18e57fc85fb3db82 /lib/sqlalchemy/engine/default.py
parente9076d04b0ec82a403a885be7999eab7d346923b (diff)
downloadsqlalchemy-9680e6483f4a811e147dd75bf3f5ccab989f01e0.tar.gz
- added native INTERVAL type to the dialect. This supports
only the DAY TO SECOND interval type so far due to lack of support in cx_oracle for YEAR TO MONTH. [ticket:1467] - The Interval type includes a "native" flag which controls if native INTERVAL types (postgresql + oracle) are selected if available, or not. "day_precision" and "second_precision" arguments are also added which propagate as appropriately to these native types. Related to [ticket:1467]. - DefaultDialect.type_descriptor moves back to being per-dialect. TypeEngine/TypeDecorator key type impls to the dialect class + server_version_info so that the colspecs dict can be modified per-dialect based on server version. - Fixed TypeDecorator's incorrect usage of _impl_dict
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
-rw-r--r--lib/sqlalchemy/engine/default.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py
index 5d37741bd..4b2e3b681 100644
--- a/lib/sqlalchemy/engine/default.py
+++ b/lib/sqlalchemy/engine/default.py
@@ -57,6 +57,8 @@ class DefaultDialect(base.Dialect):
supports_default_values = False
supports_empty_insert = True
+ server_version_info = None
+
# indicates symbol names are
# UPPERCASEd if they are case insensitive
# within the database.
@@ -142,8 +144,7 @@ class DefaultDialect(base.Dialect):
cursor.close()
return result
- @classmethod
- def type_descriptor(cls, typeobj):
+ def type_descriptor(self, typeobj):
"""Provide a database-specific ``TypeEngine`` object, given
the generic object which comes from the types module.
@@ -152,7 +153,7 @@ class DefaultDialect(base.Dialect):
and passes on to ``types.adapt_type()``.
"""
- return sqltypes.adapt_type(typeobj, cls.colspecs)
+ return sqltypes.adapt_type(typeobj, self.colspecs)
def reflecttable(self, connection, table, include_columns):
insp = reflection.Inspector.from_engine(connection)