-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I'm using this in one of my projects at work, and one of the features I'm implementing needs some stuff that doesn't seem possible with the insert-record or update-values functions. I'm trying to increment a counter in a row. If I was doing it in SQL I would do something along the lines of this:
UPDATE posts
SET likes = likes + 1
WHERE id = ?I had noticed the with-db macro, but when looking at the official clojure jdbc library, they say that with-connection is deprecated and shouldn't be used. Is there a way to just run a query like this?
Also, how would I go about doing a database transaction?
Thanks for any help!
Tom
Metadata
Metadata
Assignees
Labels
No labels