def prep_for_like_query(self, x):
        from django.utils.encoding import smart_unicode
        return smart_unicode(x).replace("\\", "\\\\").replace("%", "\%").replace("_", "\_")

    # Same as prep_for_like_query(), but called for "iexact" matches, which
    # need not necessarily be implemented using "LIKE" in the backend.
Prepares a value for use in a LIKE query.
dataset/ETHPy150Open dcramer/django-compositepks/django/db/backends/__init__.py/BaseDatabaseOperations.prep_for_like_query