MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / ilike

Method ilike

lib/sqlalchemy/sql/operators.py:726–758  ·  view source on GitHub ↗

r"""Implement the ``ilike`` operator, e.g. case insensitive LIKE. In a column context, produces an expression either of the form: .. sourcecode:: sql lower(a) LIKE lower(other) Or on backends that support the ILIKE operator: .. sourcecode:: sql

(
        self, other: Any, escape: Optional[str] = None
    )

Source from the content-addressed store, hash-verified

724 return self.operate(like_op, other, escape=escape)
725
726 def ilike(
727 self, other: Any, escape: Optional[str] = None
728 ) -> ColumnOperators:
729 r"""Implement the ``ilike`` operator, e.g. case insensitive LIKE.
730
731 In a column context, produces an expression either of the form:
732
733 .. sourcecode:: sql
734
735 lower(a) LIKE lower(other)
736
737 Or on backends that support the ILIKE operator:
738
739 .. sourcecode:: sql
740
741 a ILIKE other
742
743 E.g.::
744
745 stmt = select(sometable).where(sometable.c.column.ilike("%foobar%"))
746
747 :param other: expression to be compared
748 :param escape: optional escape character, renders the ``ESCAPE``
749 keyword, e.g.::
750
751 somecolumn.ilike("foo/%bar", escape="/")
752
753 .. seealso::
754
755 :meth:`.ColumnOperators.like`
756
757 """ # noqa: E501
758 return self.operate(ilike_op, other, escape=escape)
759
760 def bitwise_xor(self, other: Any) -> ColumnOperators:
761 """Produce a bitwise XOR operation, typically via the ``^``

Callers 15

ilike_opFunction · 0.45
test_like_5Method · 0.45
test_like_6Method · 0.45
test_like_7Method · 0.45
test_like_8Method · 0.45
test_like_9Method · 0.45
test_like_10Method · 0.45
test_like_11Method · 0.45
test_like_12Method · 0.45
test_ilikeMethod · 0.45
test_ilike_escapeMethod · 0.45

Calls 1

operateMethod · 0.95

Tested by 15

test_like_5Method · 0.36
test_like_6Method · 0.36
test_like_7Method · 0.36
test_like_8Method · 0.36
test_like_9Method · 0.36
test_like_10Method · 0.36
test_like_11Method · 0.36
test_like_12Method · 0.36
test_ilikeMethod · 0.36
test_ilike_escapeMethod · 0.36
test_ilikeMethod · 0.36