diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-18 03:00:05 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-18 03:00:05 +0000 |
| commit | 9680e6483f4a811e147dd75bf3f5ccab989f01e0 (patch) | |
| tree | 55d13b9a50e139561b127cde18e57fc85fb3db82 /lib/sqlalchemy/dialects/postgresql | |
| parent | e9076d04b0ec82a403a885be7999eab7d346923b (diff) | |
| download | sqlalchemy-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/dialects/postgresql')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 308e23bae..2c8f896e9 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -109,6 +109,10 @@ class INTERVAL(sqltypes.TypeEngine): def adapt(self, impltype): return impltype(self.precision) + @classmethod + def _adapt_from_generic_interval(cls, interval): + return INTERVAL(precision=interval.second_precision) + @property def _type_affinity(self): return sqltypes.Interval |
