MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / ilike

Method ilike

lib/sqlalchemy/sql/operators.py:926–958  ·  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

924 return self.operate(like_op, other, escape=escape)
925
926 def ilike(
927 self, other: Any, escape: Optional[str] = None
928 ) -> ColumnOperators:
929 r"""Implement the ``ilike`` operator, e.g. case insensitive LIKE.
930
931 In a column context, produces an expression either of the form:
932
933 .. sourcecode:: sql
934
935 lower(a) LIKE lower(other)
936
937 Or on backends that support the ILIKE operator:
938
939 .. sourcecode:: sql
940
941 a ILIKE other
942
943 E.g.::
944
945 stmt = select(sometable).where(sometable.c.column.ilike("%foobar%"))
946
947 :param other: expression to be compared
948 :param escape: optional escape character, renders the ``ESCAPE``
949 keyword, e.g.::
950
951 somecolumn.ilike("foo/%bar", escape="/")
952
953 .. seealso::
954
955 :meth:`.ColumnOperators.like`
956
957 """ # noqa: E501
958 return self.operate(ilike_op, other, escape=escape)
959
960 def bitwise_xor(self, other: Any) -> ColumnOperators:
961 """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