r"""Implement the ``like`` operator. In a column context, produces the expression: .. sourcecode:: sql a LIKE other E.g.:: stmt = select(sometable).where(sometable.c.column.like("%foobar%")) :param other: expression to be compared
(
self, other: Any, escape: Optional[str] = None
)
| 896 | return self.reverse_operate(concat_op, other) |
| 897 | |
| 898 | def like( |
| 899 | self, other: Any, escape: Optional[str] = None |
| 900 | ) -> ColumnOperators: |
| 901 | r"""Implement the ``like`` operator. |
| 902 | |
| 903 | In a column context, produces the expression: |
| 904 | |
| 905 | .. sourcecode:: sql |
| 906 | |
| 907 | a LIKE other |
| 908 | |
| 909 | E.g.:: |
| 910 | |
| 911 | stmt = select(sometable).where(sometable.c.column.like("%foobar%")) |
| 912 | |
| 913 | :param other: expression to be compared |
| 914 | :param escape: optional escape character, renders the ``ESCAPE`` |
| 915 | keyword, e.g.:: |
| 916 | |
| 917 | somecolumn.like("foo/%bar", escape="/") |
| 918 | |
| 919 | .. seealso:: |
| 920 | |
| 921 | :meth:`.ColumnOperators.ilike` |
| 922 | |
| 923 | """ |
| 924 | return self.operate(like_op, other, escape=escape) |
| 925 | |
| 926 | def ilike( |
| 927 | self, other: Any, escape: Optional[str] = None |