diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-13 14:25:58 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-13 14:25:58 -0400 |
commit | 252ab17c7dc5f1cfd1a5173fb6d9e4b819e1ebb7 (patch) | |
tree | b3ef5494868f308f8f240648604e5ed01f99306f /lib/sqlalchemy | |
parent | 646bb7ae373d387d24fc2854895d942af36a1b14 (diff) | |
download | sqlalchemy-252ab17c7dc5f1cfd1a5173fb6d9e4b819e1ebb7.tar.gz |
- Added basic math expression coercion for
Numeric->Integer,
so that resulting type is Numeric regardless
of the direction of the expression.
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/types.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 91eb35275..777353714 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -1024,20 +1024,25 @@ class Numeric(_DateAffinity, TypeEngine): operators.mul:{ Interval:Interval, Numeric:Numeric, + Integer:Numeric, }, # Py2K operators.div:{ Numeric:Numeric, + Integer:Numeric, }, # end Py2K operators.truediv:{ Numeric:Numeric, + Integer:Numeric, }, operators.add:{ Numeric:Numeric, + Integer:Numeric, }, operators.sub:{ Numeric:Numeric, + Integer:Numeric, } } |