Add SELECT ... FOR UPDATE support
Opened this issue · 4 comments
rubymaniac commented
Is there any way I can do this using the latest version?
rubymaniac commented
Anyone?
brianc commented
Not that I know of. Do you have a more expanded version of the query? I'm not familiar with SELECT...FOR UPDATE
though it could have been added by another contributor.
rubymaniac commented
It is just an ordinary select statement but at the end of it there is a FOR UPDATE. If FOR UPDATE or FOR SHARE is specified, the SELECT statement locks the selected rows against concurrent updates. You can see more here http://www.postgresql.org/docs/9.0/static/sql-select.html (search FOR UPDATE). How one should go about constructing this query? Is there any straightforward way?
rubymaniac commented
I created a pull request with tests that solves this 5f0b3ba