{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Database.Relational.Projectable.Instances () where
import Data.Functor.ProductIsomorphic
(ProductIsoFunctor, (|$|), ProductIsoApplicative, pureP, (|*|),
ProductIsoEmpty, pureE, peRight, peLeft, )
import Database.Relational.Internal.ContextType
(Flat, Aggregated, OverWindow)
import qualified Database.Relational.Record as Record
import Database.Relational.Projectable.Unsafe
(SqlContext (..), OperatorContext, AggregatedContext, PlaceHolders (..))
instance SqlContext Flat where
unsafeProjectSqlTerms :: [StringSQL] -> Record Flat t
unsafeProjectSqlTerms = [StringSQL] -> Record Flat t
forall c t. [StringSQL] -> Record c t
Record.unsafeFromSqlTerms
instance SqlContext Aggregated where
unsafeProjectSqlTerms :: [StringSQL] -> Record Aggregated t
unsafeProjectSqlTerms = [StringSQL] -> Record Aggregated t
forall c t. [StringSQL] -> Record c t
Record.unsafeFromSqlTerms
instance SqlContext OverWindow where
unsafeProjectSqlTerms :: [StringSQL] -> Record OverWindow t
unsafeProjectSqlTerms = [StringSQL] -> Record OverWindow t
forall c t. [StringSQL] -> Record c t
Record.unsafeFromSqlTerms
instance OperatorContext Flat
instance OperatorContext Aggregated
instance AggregatedContext Aggregated
instance AggregatedContext OverWindow
instance ProductIsoEmpty PlaceHolders () where
pureE :: PlaceHolders ()
pureE = PlaceHolders ()
forall p. PlaceHolders p
PlaceHolders
peRight :: PlaceHolders (a, ()) -> PlaceHolders a
peRight PlaceHolders (a, ())
_ = PlaceHolders a
forall p. PlaceHolders p
PlaceHolders
peLeft :: PlaceHolders ((), a) -> PlaceHolders a
peLeft PlaceHolders ((), a)
_ = PlaceHolders a
forall p. PlaceHolders p
PlaceHolders
instance ProductIsoFunctor PlaceHolders where
a -> b
_ |$| :: (a -> b) -> PlaceHolders a -> PlaceHolders b
|$| PlaceHolders a
PlaceHolders = PlaceHolders b
forall p. PlaceHolders p
PlaceHolders
instance ProductIsoApplicative PlaceHolders where
pureP :: a -> PlaceHolders a
pureP a
_ = PlaceHolders a
forall p. PlaceHolders p
PlaceHolders
PlaceHolders (a -> b)
_pf |*| :: PlaceHolders (a -> b) -> PlaceHolders a -> PlaceHolders b
|*| PlaceHolders a
_pa = PlaceHolders b
forall p. PlaceHolders p
PlaceHolders