diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-11 21:36:03 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-11 21:36:03 +0000 |
| commit | 30327525de42fc4812a0a3b2ad2f67e70dcd698b (patch) | |
| tree | fdc2b170e9a50d5893b9c47612098ad4ef1f239c /lib/sqlalchemy | |
| parent | b763015642739353bfd6a9d95061d2955e79d3e1 (diff) | |
| parent | ec0fafc7b01839c2fac7f93cb2e0a92aa3e1c41a (diff) | |
| download | sqlalchemy-30327525de42fc4812a0a3b2ad2f67e70dcd698b.tar.gz | |
this resolves the returning failures from #1733
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/types.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 5c4e2ca3f..bf06ec99b 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -33,6 +33,7 @@ from sqlalchemy.util import pickle from sqlalchemy.sql.visitors import Visitable from sqlalchemy import util from sqlalchemy import processors +import collections NoneType = type(None) if util.jython: @@ -820,12 +821,32 @@ class Integer(_DateAffinity, TypeEngine): @util.memoized_property def _expression_adaptations(self): + # TODO: need a dictionary object that will + # handle operators generically here, this is incomplete return { operators.add:{ Date:Date, + Integer:Integer, + Numeric:Numeric, }, operators.mul:{ - Interval:Interval + Interval:Interval, + Integer:Integer, + Numeric:Numeric, + }, + # Py2K + operators.div:{ + Integer:Integer, + Numeric:Numeric, + }, + # end Py2K + operators.truediv:{ + Integer:Integer, + Numeric:Numeric, + }, + operators.sub:{ + Integer:Integer, + Numeric:Numeric, }, } |
