NPoco
NPoco copied to clipboard
Hint() with PostgreSQL
I'm migrating a system that was on MS SQL to PostgreSQL. To help protect against deadlocks, the old code used Hint quite often:
db.Query<Table>().Hint("WITH (UPDLOCK)").Where(...)
The PostgreSQL equivalent is FOR UPDATE
, however this is required at the end of the query instead of before the WHERE
clause. Is this possible with npoco as is?
It is of course entirely possible that because PostgreSQL is completely different I won't need any such lock hinting.