Fork me on GitHub
#sql
<
2022-02-21
>
pinkfrog15:02:18

Hi. How to convert this query into next-jdbc.

update task
set scheduled_at = clock_timestamp() + ?::interval
I don’t how to make the ?::interval part.

lukasz15:02:08

(next.jdbc/execute conn ["update task set scheduled_at = current_timestamp + ?::interval" "3 minutes"]) Should Just Work ™️

pinkfrog00:02:21

sorry, this should be a honeysql question

Zach Mitchell22:02:47

I'm using next.jdbc and I'd like to see the exact SQL that my sql/insert! expands to. Is there a way to do that? What I'm really trying to do is debug whether my kebab-case-opts are being applied properly.

Zach Mitchell00:02:33

Thanks, I missed that when I was skimming the docs. It turns out my issue was that the snake-kebab-opts are discarded when you call get-connection , which I also didn't see in the docs until reading deeper 🙂