News for hackers. Stuff that matters.
Re:ORMs Are Backwards by jrochkind1 on Tuesday September 03, 2019 @09:48PM (#20873251)
The number of times I've had to increment a value by one are minimal. Or similar things where you want to update one value based on the other values, and do it in an atomic way.

But if I had to increment specifically, and were using ActiveRecord... I'd use the ActiveRecord increment! method. Which has the proper db-atomicity semantics you want, it does execute `UPDATE x SET n = n+1 WHERE pk = y ...`

There are no comments on this comment yet.