1{-# language DataKinds #-}
2{-# language FlexibleContexts #-}
3{-# language ScopedTypeVariables #-}
4{-# language TypeApplications #-}
5{-# language TypeFamilies #-}
7{-# options_ghc -fno-warn-redundant-constraints #-}
11 , sappend, sappend1, sempty
16import Data.List.NonEmpty ( NonEmpty )
20import qualified Opaleye.Internal.HaskellDB.PrimQuery as Opaleye
23import {-# SOURCE #-} Rel8.Expr ( Expr )
24import Rel8.Expr.Opaleye
25 ( fromPrimExpr, toPrimExpr
28import Rel8.Type ( DBType, typeInformation )
29import Rel8.Type.Array ( array, zipPrimArraysWith )
30import Rel8.Type.Information ( TypeInformation(..) )
31import Rel8.Schema.Nullability ( Unnullify, Nullability, Sql )
34sappend :: Expr [a] -> Expr [a] -> Expr [a]
35sappend = zipPrimExprsWith (zipPrimArraysWith (Opaleye.BinExpr (Opaleye.:||)))
38sappend1 :: Expr (NonEmpty a) -> Expr (NonEmpty a) -> Expr (NonEmpty a)
39sappend1 = zipPrimExprsWith (zipPrimArraysWith (Opaleye.BinExpr (Opaleye.:||)))
42sempty :: Nullability a -> TypeInformation (Unnullify a) -> Expr [a]
43sempty _ info = fromPrimExpr $ array info []
46listOf :: forall a. Sql DBType a => [Expr a] -> Expr [a]
48 fromPrimExpr . array (typeInformation @(Unnullify a)) . fmap toPrimExpr
51nonEmptyOf :: forall a. Sql DBType a => NonEmpty (Expr a) -> Expr (NonEmpty a)
53 fromPrimExpr . array (typeInformation @(Unnullify a)) . fmap toPrimExpr
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