diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-28 13:58:01 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-28 13:58:01 -0500 |
commit | 7790425a993480e81605efc8a07fed13bcdd4841 (patch) | |
tree | 26564ab082411af34c9ad307442727ab818a8150 /lib/sqlalchemy/sql/operators.py | |
parent | b3cf6c44e1bbcdd2cfc68a207f6fd3cd8380c0f1 (diff) | |
download | sqlalchemy-7790425a993480e81605efc8a07fed13bcdd4841.tar.gz |
- add full docs for like()/ilike()
Diffstat (limited to 'lib/sqlalchemy/sql/operators.py')
-rw-r--r-- | lib/sqlalchemy/sql/operators.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index f233bf0fb..10d01acd6 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -356,6 +356,20 @@ class ColumnOperators(Operators): In a column context, produces the clause ``a LIKE other``. + E.g.:: + + select([sometable]).where(sometable.c.column.like("%foobar%")) + + :param other: expression to be compared + :param escape: optional escape character, renders the ``ESCAPE`` + keyword, e.g.:: + + somecolumn.like("foo/%bar", escape="/") + + .. seealso:: + + :meth:`.ColumnOperators.ilike` + """ return self.operate(like_op, other, escape=escape) @@ -364,6 +378,20 @@ class ColumnOperators(Operators): In a column context, produces the clause ``a ILIKE other``. + E.g.:: + + select([sometable]).where(sometable.c.column.ilike("%foobar%")) + + :param other: expression to be compared + :param escape: optional escape character, renders the ``ESCAPE`` + keyword, e.g.:: + + somecolumn.ilike("foo/%bar", escape="/") + + .. seealso:: + + :meth:`.ColumnOperators.like` + """ return self.operate(ilike_op, other, escape=escape) |