mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-28 03:26:01 -04:00
Merge remote-tracking branch 'origin/pr/188' into pr188
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -1327,6 +1327,9 @@ class MathOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
|
||||
else:
|
||||
self._test_math_op(operator.div, '/')
|
||||
|
||||
def test_math_op_mod(self):
|
||||
self._test_math_op(operator.mod, '%')
|
||||
|
||||
|
||||
class ComparisonOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
|
||||
__dialect__ = 'default'
|
||||
|
||||
Reference in New Issue
Block a user