opaleye-0.7.3.0: An SQL-generating DSL targeting PostgreSQL
Safe HaskellNone
LanguageHaskell2010

Opaleye.Internal.Locking

Description

Support for Postgres SELECT locking clauses.

This functionality is new. If you use it then please open an issue on GitHub and let us know how it went, whether that is well or badly.

Not all Postgres locking clauses are supported. If you need another form of locking clause then please open an issue on GitHub.

Synopsis

Documentation

forUpdate :: Select a -> Select a Source #

Adds a FOR UPDATE clause to the Select.

Postgres has strong restrictions regarding the SELECT clauses to which a FOR UPDATE can be added. Opaleye makes no attempt to enforce those restrictions through its type system so it's very easy to create queries that fail at run time using this operation.