go-kallax icon indicating copy to clipboard operation
go-kallax copied to clipboard

Any support for "FOR UPDATE"?

Open m1ome opened this issue 5 years ago • 0 comments

Hey, wonderful software, but i am trying to define do you have a FOR UPDATE support. It can be very handy to do such things when you have very concurrent selects & updates, and you wanna make sure only one worker/instance will work with record concurrently.

In e.g. if i want to load use and check if it have a proper status i will do:

BEGIN;
SELECT * FROM user WHERE id=123 FOR UPDATE SKIP LOCKED;

... DOING SOME STUFF, checking if it return nothing and e.t.c

COMMIT;

m1ome avatar Mar 27 '19 13:03 m1ome