module Opaleye.Label (
  label
  ) where

import qualified Opaleye.Internal.Label as L
import qualified Opaleye.Internal.QueryArr as Q
import qualified Opaleye.Select            as S

-- | Add a commented label to the generated SQL.
label :: String -> S.SelectArr a b -> S.SelectArr a b
label :: String -> SelectArr a b -> SelectArr a b
label String
l SelectArr a b
a = ((a, PrimQuery, Tag) -> (b, PrimQuery, Tag)) -> SelectArr a b
forall a b.
((a, PrimQuery, Tag) -> (b, PrimQuery, Tag)) -> SelectArr a b
Q.QueryArr (String -> (b, PrimQuery, Tag) -> (b, PrimQuery, Tag)
forall a. String -> (a, PrimQuery, Tag) -> (a, PrimQuery, Tag)
L.label' String
l ((b, PrimQuery, Tag) -> (b, PrimQuery, Tag))
-> ((a, PrimQuery, Tag) -> (b, PrimQuery, Tag))
-> (a, PrimQuery, Tag)
-> (b, PrimQuery, Tag)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SelectArr a b -> (a, PrimQuery, Tag) -> (b, PrimQuery, Tag)
forall a b.
QueryArr a b -> (a, PrimQuery, Tag) -> (b, PrimQuery, Tag)
Q.runQueryArr SelectArr a b
a)