opaleye-0.7.3.0: An SQL-generating DSL targeting PostgreSQL
Safe HaskellNone
LanguageHaskell2010

Opaleye.Internal.Values

Synopsis

Documentation

valuesU :: Unpackspec columns columns' -> ValuesspecUnsafe columns columns' -> [columns] -> ((), Tag) -> (columns', PrimQuery, Tag) Source #

extractValuesField :: Tag -> primExpr -> PM [(Symbol, primExpr)] PrimExpr Source #

newtype ValuesspecUnsafe columns columns' Source #

Constructors

Valuesspec (PackMap () PrimExpr () columns') 

Instances

Instances details
Profunctor ValuesspecUnsafe Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

dimap :: (a -> b) -> (c -> d) -> ValuesspecUnsafe b c -> ValuesspecUnsafe a d #

lmap :: (a -> b) -> ValuesspecUnsafe b c -> ValuesspecUnsafe a c #

rmap :: (b -> c) -> ValuesspecUnsafe a b -> ValuesspecUnsafe a c #

(#.) :: forall a b c q. Coercible c b => q b c -> ValuesspecUnsafe a b -> ValuesspecUnsafe a c #

(.#) :: forall a b c q. Coercible b a => ValuesspecUnsafe b c -> q a b -> ValuesspecUnsafe a c #

ProductProfunctor ValuesspecUnsafe Source # 
Instance details

Defined in Opaleye.Internal.Values

Default ValuesspecUnsafe (Column a) (Column a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

def :: ValuesspecUnsafe (Column a) (Column a) #

Functor (ValuesspecUnsafe a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

fmap :: (a0 -> b) -> ValuesspecUnsafe a a0 -> ValuesspecUnsafe a b #

(<$) :: a0 -> ValuesspecUnsafe a b -> ValuesspecUnsafe a a0 #

Applicative (ValuesspecUnsafe a) Source # 
Instance details

Defined in Opaleye.Internal.Values

runValuesspec :: Applicative f => ValuesspecUnsafe columns columns' -> (() -> f PrimExpr) -> f columns' Source #

valuesUSafe :: Valuesspec columns columns' -> [columns] -> ((), Tag) -> (columns', PrimQuery, Tag) Source #

data Valuesspec columns columns' Source #

Constructors

ValuesspecSafe (PackMap PrimExpr PrimExpr () columns') (Unpackspec columns columns') 

Instances

Instances details
Profunctor Valuesspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

dimap :: (a -> b) -> (c -> d) -> Valuesspec b c -> Valuesspec a d #

lmap :: (a -> b) -> Valuesspec b c -> Valuesspec a c #

rmap :: (b -> c) -> Valuesspec a b -> Valuesspec a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Valuesspec a b -> Valuesspec a c #

(.#) :: forall a b c q. Coercible b a => Valuesspec b c -> q a b -> Valuesspec a c #

ProductProfunctor Valuesspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

purePP :: b -> Valuesspec a b #

(****) :: Valuesspec a (b -> c) -> Valuesspec a b -> Valuesspec a c #

empty :: Valuesspec () () #

(***!) :: Valuesspec a b -> Valuesspec a' b' -> Valuesspec (a, a') (b, b') #

IsSqlType a => Default Valuesspec (Column a) (Column a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

def :: Valuesspec (Column a) (Column a) #

Default Valuesspec a b => Default Valuesspec (MaybeFields a) (MaybeFields b) Source # 
Instance details

Defined in Opaleye.Internal.MaybeFields

Functor (Valuesspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

fmap :: (a0 -> b) -> Valuesspec a a0 -> Valuesspec a b #

(<$) :: a0 -> Valuesspec a b -> Valuesspec a a0 #

Applicative (Valuesspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

pure :: a0 -> Valuesspec a a0 #

(<*>) :: Valuesspec a (a0 -> b) -> Valuesspec a a0 -> Valuesspec a b #

liftA2 :: (a0 -> b -> c) -> Valuesspec a a0 -> Valuesspec a b -> Valuesspec a c #

(*>) :: Valuesspec a a0 -> Valuesspec a b -> Valuesspec a b #

(<*) :: Valuesspec a a0 -> Valuesspec a b -> Valuesspec a a0 #

runValuesspecSafe :: Applicative f => Valuesspec columns columns' -> (PrimExpr -> f PrimExpr) -> f columns' Source #

nullPE :: IsSqlType a => proxy a -> PrimExpr Source #

newtype Nullspec fields fields' Source #

Constructors

Nullspec (Valuesspec fields fields') 

Instances

Instances details
Profunctor Nullspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

dimap :: (a -> b) -> (c -> d) -> Nullspec b c -> Nullspec a d #

lmap :: (a -> b) -> Nullspec b c -> Nullspec a c #

rmap :: (b -> c) -> Nullspec a b -> Nullspec a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Nullspec a b -> Nullspec a c #

(.#) :: forall a b c q. Coercible b a => Nullspec b c -> q a b -> Nullspec a c #

ProductProfunctor Nullspec Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

purePP :: b -> Nullspec a b #

(****) :: Nullspec a (b -> c) -> Nullspec a b -> Nullspec a c #

empty :: Nullspec () () #

(***!) :: Nullspec a b -> Nullspec a' b' -> Nullspec (a, a') (b, b') #

IsSqlType b => Default Nullspec a (Column b) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

def :: Nullspec a (Column b) #

Functor (Nullspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

fmap :: (a0 -> b) -> Nullspec a a0 -> Nullspec a b #

(<$) :: a0 -> Nullspec a b -> Nullspec a a0 #

Applicative (Nullspec a) Source # 
Instance details

Defined in Opaleye.Internal.Values

Methods

pure :: a0 -> Nullspec a a0 #

(<*>) :: Nullspec a (a0 -> b) -> Nullspec a a0 -> Nullspec a b #

liftA2 :: (a0 -> b -> c) -> Nullspec a a0 -> Nullspec a b -> Nullspec a c #

(*>) :: Nullspec a a0 -> Nullspec a b -> Nullspec a b #

(<*) :: Nullspec a a0 -> Nullspec a b -> Nullspec a a0 #

nullFields :: Nullspec a fields -> fields Source #

All fields NULL, even though technically the type may forbid that! Used to create such fields when we know we will never look at them expecting to find something non-NULL.