I would like to do a LIKE query in persistent, I’m using sqlite. The yesod book gives an example of using raw SQL to do it, but says:
you can express a LIKE operator directly in the normal syntax due to a
feature added in Persistent 0.6, which allows backend-specific
operators
I couldn’t find an example of that, though. Would somebody have an example of what it would mean to use a specific operator like LIKE with selectList or something equivalent?
Thanks!
I know I’ve used it before, but I can’t remember where. Anyway, a simple example (not GHC-checked, apologies) would be:
Obviously you can create some helper function, e.g.: