Commits

Mike Bayer committed 1493f6f

added __mod__ type

Comments (0)

Files changed (3)

 0.1.7
 - 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

lib/sqlalchemy/sql.py

         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):

lib/sqlalchemy/types.py

     def engine_impl(self, engine):
         try:
             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()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.