CrazyCroatKid
CrazyCroatKid
Explore posts from servers
DTDrizzle Team
Created by CrazyCroatKid on 5/6/2024 in #help
How to retry seriazible transactions Drizzle Orm
Got it working! Looks like there is for lock that is not in the documentation. Just set something up like this:
const lockedRowQuery = tx
.select()
.from(url)
.limit(1)
.orderBy(url.gmPartNo)
.for("update", { skipLocked: true })
.where(eq(url.scraped, false));
const lockedRowQuery = tx
.select()
.from(url)
.limit(1)
.orderBy(url.gmPartNo)
.for("update", { skipLocked: true })
.where(eq(url.scraped, false));
2 replies