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

hyperh picture hyperh  ·  3Comments

legomind picture legomind  ·  3Comments

lanceschi picture lanceschi  ·  3Comments

sandrocsimas picture sandrocsimas  ·  3Comments

olaferlandsen picture olaferlandsen  ·  3Comments