What would the SQL look like for that update @orlandomr27?
(you can always do (jdbc/execute-one! ds ["arbitrary SQL for updating DB" ...])
which is why I’m asking)
Given a collection of :code
/`:status` pairs that could have arbitrary values, I don’t think you could construct a single SQL statement that updated all the matching rows.
So perhaps instead of “single statement” you mean “single transaction”?
Exactly, I meant a single transaction. I have not yet written a SQL query for that
Are you using next.jdbc
? If so: https://cljdoc.org/d/com.github.seancorfield/next.jdbc/1.2.659/doc/getting-started#datasources-connections--transactions
Will take a look. Thanks