def mysql_ends_with(field: Term, value: str) -> Criterion: return Like( functions.Cast(field, SqlTypes.CHAR), StrWrapper(f"%{escape_like(value)}"), escape="" )
def mysql_insensitive_ends_with(field: Term, value: str) -> Criterion: return Like( functions.Upper(functions.Cast(field, SqlTypes.CHAR)), functions.Upper(StrWrapper(f"%{escape_like(value)}")), escape="", )
def mssql_contains(field: Term, value: str) -> Criterion: return Like( functions.Cast(field, SqlTypes.CHAR), StrWrapper(f"%{escape_like(value)}%"), escape="" )