honeysql

2023-06-07T12:15:03.197899Z

Is there a way to turn

(sql/raw (str "(p.date + s.term - INTERVAL '1 DAY')::DATE"))
into sql/call forms with type conversion as well? I am using honeysql 1.x version.

p-himik 2023-06-07T13:50:55.768029Z

Not sure what you mean. Why would you need to change the above if it works? Also, there's no need for that str since the argument is already a string.

p-himik 2023-06-07T13:51:25.104829Z

Just in case, you can convert types by calling the cast function, at least in PostgreSQL.