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
)
| 696 | return self.reverse_operate(concat_op, other) |
| 697 | |
| 698 | def like( |
| 699 | self, other: Any, escape: Optional[str] = None |
| 700 | ) -> ColumnOperators: |
| 701 | r"""Implement the ``like`` operator. |
| 702 | |
| 703 | In a column context, produces the expression: |
| 704 | |
| 705 | .. sourcecode:: sql |
| 706 | |
| 707 | a LIKE other |
| 708 | |
| 709 | E.g.:: |
| 710 | |
| 711 | stmt = select(sometable).where(sometable.c.column.like("%foobar%")) |
| 712 | |
| 713 | :param other: expression to be compared |
| 714 | :param escape: optional escape character, renders the ``ESCAPE`` |
| 715 | keyword, e.g.:: |
| 716 | |
| 717 | somecolumn.like("foo/%bar", escape="/") |
| 718 | |
| 719 | .. seealso:: |
| 720 | |
| 721 | :meth:`.ColumnOperators.ilike` |
| 722 | |
| 723 | """ |
| 724 | return self.operate(like_op, other, escape=escape) |
| 725 | |
| 726 | def ilike( |
| 727 | self, other: Any, escape: Optional[str] = None |