brianc/node-sql

Add SELECT ... FOR UPDATE support

Opened this issue · 4 comments

Is there any way I can do this using the latest version?

Anyone?

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.

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?

I created a pull request with tests that solves this 5f0b3ba