You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def escape_like(text: str) -> str:
"""Escape text for like.
:param text: the raw text
:return: escaped text
"""
return text.replace("%", "\\%").replace("_", "\\%")
This helper method should be part of the lib:
Example of other frameworks having this https://sqlalchemy-utils.readthedocs.io/en/stable/orm_helpers.html#escape-like
The text was updated successfully, but these errors were encountered: