diff options
author | Dan Gittik <dan.gittik@gmail.com> | 2015-07-17 02:26:31 +0300 |
---|---|---|
committer | Dan Gittik <dan.gittik@gmail.com> | 2015-07-17 02:26:31 +0300 |
commit | 249bc5be0038dcf69a94ad558d7bd4c1012a47c4 (patch) | |
tree | d0579735ec7c05d3e580bec93866d15f3c912483 /lib/sqlalchemy/sql/operators.py | |
parent | eed8bcef3ae1341cc9c25f5abff55a9ff880cfac (diff) | |
download | sqlalchemy-249bc5be0038dcf69a94ad558d7bd4c1012a47c4.tar.gz |
Added support for reflected modulo operator.
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r-- | lib/sqlalchemy/sql/operators.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index 51f162c98..17a9d3086 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -597,6 +597,14 @@ class ColumnOperators(Operators): """ return self.reverse_operate(div, other) + def __rmod__(self, other): + """Implement the ``%`` operator in reverse. + + See :meth:`.ColumnOperators.__mod__`. + + """ + return self.reverse_operate(mod, other) + def between(self, cleft, cright, symmetric=False): """Produce a :func:`~.expression.between` clause against the parent object, given the lower and upper range. |