module Rel8.Query.Window
( window
)
where
import Prelude ()
import qualified Opaleye.Window as Opaleye
import Rel8.Query ( Query )
import Rel8.Query.Opaleye ( mapOpaleye )
import Rel8.Window ( Window( Window ) )
window :: Window a b -> Query a -> Query b
window :: forall a b. Window a b -> Query a -> Query b
window (Window Windows a b
a) = (Select a -> Select b) -> Query a -> Query b
forall a b. (Select a -> Select b) -> Query a -> Query b
mapOpaleye (Windows a b -> Select a -> Select b
forall a b. Windows a b -> Select a -> Select b
Opaleye.runWindows Windows a b
a)