Closed pieterclaerhout closed 3 years ago
Is there any way to use the select builder to do something like:
SELECT * FROM "mytable" WHERE "state" = ? AND "queue" = ? ORDER BY "created_on" LIMIT 1 FOR UPDATE SKIP LOCKED
The closest I get is:
dbr.From("mytable"). Where("state = ? and queue = ?", statusQueued, queue). OrderBy("created_on"). Limit(1). ForUpdate()
But that misses the last (essential) part SKIP LOCKED…
SKIP LOCKED
Is there any way to use the select builder to do something like:
The closest I get is:
But that misses the last (essential) part
SKIP LOCKED
…