1{-# language MonoLocalBinds #-}
3module Rel8.Statement.Where
12import qualified Opaleye.Internal.HaskellDB.Sql.Print as Opaleye
13import qualified Opaleye.Internal.Sql as Opaleye
16import Text.PrettyPrint ( Doc, (<+>), text )
19import Rel8.Expr ( Expr )
20import Rel8.Expr.Opaleye ( toPrimExpr )
21import Rel8.Schema.Name ( Selects )
22import Rel8.Schema.Table ( TableSchema )
23import Rel8.Table.Opaleye ( attributes )
26ppWhere :: Selects names exprs
27 => TableSchema names -> (exprs -> Expr Bool) -> Doc
28ppWhere schema where_ = text "WHERE" <+> ppExpr condition
30 ppExpr = Opaleye.ppSqlExpr . Opaleye.sqlExpr . toPrimExpr
31 condition = where_ (attributes schema)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list