module Opaleye.Internal.Locking where
import qualified Opaleye.Internal.QueryArr as Q
import qualified Opaleye.Internal.PrimQuery as PQ
forUpdate :: Q.Select a -> Q.Select a
forUpdate :: Select a -> Select a
forUpdate Select a
s =
(((), PrimQuery, Tag) -> (a, PrimQuery, Tag)) -> Select a
forall a b.
((a, PrimQuery, Tag) -> (b, PrimQuery, Tag)) -> SelectArr a b
Q.QueryArr ((\(a
a, PrimQuery
pq, Tag
t) -> (a
a, PrimQuery -> PrimQuery
forall a. PrimQuery' a -> PrimQuery' a
PQ.ForUpdate PrimQuery
pq, Tag
t)) ((a, PrimQuery, Tag) -> (a, PrimQuery, Tag))
-> (((), PrimQuery, Tag) -> (a, PrimQuery, Tag))
-> ((), PrimQuery, Tag)
-> (a, PrimQuery, Tag)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Select a -> ((), PrimQuery, Tag) -> (a, PrimQuery, Tag)
forall a b.
QueryArr a b -> (a, PrimQuery, Tag) -> (b, PrimQuery, Tag)
Q.runQueryArr Select a
s)