There seems to be no method in our DBAL (specifically SQLPlatform) that allows you to apply LOWER to a binary string. This is actually a combination of two things:
- There's no method for building a LOWER() call. This is a minor issue, because LOWER(X) works in all the DBMSs we support.
- LOWER doesn't work on binary strings, as they must be converted/collated first. For instance, in MySQL you could do LOWER(CONVERT(my_bin_string using utf8mb4)) (and I'm sure there are other ways, each with their pros and cons; I'm not saying the implementation should be exactly this one). However, there's no method in SQLPLatform that allows you to do this in a cross-compatible fashion. There's a buildStringCast() method but that's not what I need here.