Open cfurst opened 2 years ago
Hello, I'm basically trying to match parts of dates using text comparisons. Like so:
Select * from table where text(timestamptzfield) LIKE '%20:36%'
It works in PgAdmin, and the expected rows are returned. However when I try it with doobie using a fr clause like so:
fr"text(timestamptzfield) LIKE ${s"%$searchValue%"}"
where searchValue = "20:36", no rows are returned.
searchValue = "20:36"
I've debugged as much as I could, and it looks like it's working, I see the right strings, but it's returning no values form the postgreSQL db.
This works without a colon so If I use, say, searchValue = 20 the proper rows are returned. Any help would be appreciated.
searchValue = 20
Thanks!
Hmm yeah that's weird. Don't think Doobie is involved here. Can you try using raw JDBC to reproduce this issue?
Thanks for the quick reply.
Will try to reproduce. Thank you.
Hello, I'm basically trying to match parts of dates using text comparisons. Like so:
It works in PgAdmin, and the expected rows are returned. However when I try it with doobie using a fr clause like so:
where
searchValue = "20:36"
, no rows are returned.I've debugged as much as I could, and it looks like it's working, I see the right strings, but it's returning no values form the postgreSQL db.
This works without a colon so If I use, say,
searchValue = 20
the proper rows are returned. Any help would be appreciated.Thanks!