1. Ben Trofatter
  2. sqlalchemy-1753


Mike Bayer  committed 1493f6f

added __mod__ type

  • Participants
  • Parent commits 64f6811
  • Branches default
  • Tags rel_0_1_7

Comments (0)

Files changed (3)


View file
  • Ignore whitespace
 - some fixes to topological sort algorithm
 - added DISTINCT ON support to Postgres (just supply distinct=[col1,col2..])
+- added __mod__ (% operator) to sql expressions
 - "order_by" mapper property inherited from inheriting mapper
 - fix to column type used when mapper UPDATES/DELETEs
 - with convert_unicode=True, reflection was failing, has been fixed

File lib/sqlalchemy/sql.py

View file
  • Ignore whitespace
         return self._operate('*', other)
     def __div__(self, other):
         return self._operate('/', other)
+    def __mod__(self, other):
+        return self._operate('%', other)
     def __truediv__(self, other):
         return self._operate('/', other)
     def _bind_param(self, obj):

File lib/sqlalchemy/types.py

View file
  • Ignore whitespace
     def engine_impl(self, engine):
             return self.impl_dict[engine]
-        except:
+        except KeyError:
             return self.impl_dict.setdefault(engine, engine.type_descriptor(self))
     def get_col_spec(self):
         raise NotImplementedError()