Knex: Implement SKIP LOCKED

Created on 24 Feb 2017  路  3Comments  路  Source: knex/knex

Since POSTGRESQL 9.5, there is an SKIP LOCKED option for SELECT FOR SHARE/FOR UPDATE that is extremely helpful.

It would be useful to support this.

Thanks

feature request

Most helpful comment

Thank you so much for this! Closing issue since you all rock!

All 3 comments

Would be really useful.

The only workaround until now looks like performing a raw query.

knex.raw('select * from table for update skip locked')

I also want this, so I've implemented the functionality for PostgreSQL with some unit + integration tests, but I'll hold onto the PR for a few days until I also have it working on MySQL and MariaDB, for completeness. My changes are already on a public fork, however.

Thank you so much for this! Closing issue since you all rock!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PaulOlteanu picture PaulOlteanu  路  3Comments

tjwebb picture tjwebb  路  3Comments

ghost picture ghost  路  3Comments

zettam picture zettam  路  3Comments

lanceschi picture lanceschi  路  3Comments