Queries With Escape Characters: Unexpected Results

Update

I found an old thread and made some progress. It turns out that the % wildcards must be double-escaped. So I’ve now got this working:

SELECT *, Meta().id FROM SomeCollection WHERE (LOWER(`title`) LIKE "\\\\\\blah\\%\\%blah")

But if the string I want to match ends with a backslash, I have a new error:

//Error evaluating filter - cause: Trailing escape character (\\) in pattern

SELECT *, Meta().id FROM SomeCollection WHERE (LOWER(`title`) LIKE "\\\\\\blah\\%\\%blah\\")

I haven’t been able to resolve this yet. Single/Double quotes don’t matter.