diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-01-11 21:24:01 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-01-11 21:24:01 +0000 |
| commit | 6d2d5e923ee32eeea3918d2672f54dff253b253f (patch) | |
| tree | 8871b7058759a2cf60a88c4e07cc70d806c2f9be /lib/sqlalchemy/sql/expression.py | |
| parent | 664ba4467901df344e915cb50663548c74a703c6 (diff) | |
| download | sqlalchemy-6d2d5e923ee32eeea3918d2672f54dff253b253f.tar.gz | |
- added "ilike()" operator to column operations.
compiles to ILIKE on postgres, lower(x) LIKE lower(y)
on all others [ticket:727]
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 0bf9bea10..187b38a2c 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -1113,6 +1113,9 @@ class ColumnOperators(Operators): def like(self, other): return self.operate(operators.like_op, other) + def ilike(self, other): + return self.operate(operators.ilike_op, other) + def in_(self, *other): return self.operate(operators.in_op, other) @@ -1205,6 +1208,7 @@ class _CompareMixin(ColumnOperators): operators.ge : (__compare, operators.lt), operators.eq : (__compare, operators.ne), operators.like_op : (__compare, operators.notlike_op), + operators.ilike_op : (__compare, operators.notilike_op), } def operate(self, op, *other): |
