relational-query-0.12.2.1: Typeful, Modular, Relational, algebraic query engine

Copyright2013-2019 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Database.Relational.Pi

Contents

Description

This module defines typed projection path objects. Contains normal interfaces.

Synopsis

Projection path

data Pi r0 r1 Source #

Projection path from type r0 into type r1. This type also indicate key object which type is r1 for record type r0.

Instances
HasProjection l a b => IsLabel l (Pi a b) Source #

Derive IsLabel instance from HasProjection.

Instance details

Defined in Database.Relational.OverloadedProjection

Methods

fromLabel :: Pi a b #

ProductIsoFunctor (Pi a) Source #

Map projection path Pi which has record result type.

Instance details

Defined in Database.Relational.Pi.Unsafe

Methods

(|$|) :: ProductConstructor (a0 -> b) => (a0 -> b) -> Pi a a0 -> Pi a b #

ProductIsoApplicative (Pi a) Source #

Compose projection path Pi which has record result type using applicative style.

Instance details

Defined in Database.Relational.Pi.Unsafe

Methods

pureP :: ProductConstructor a0 => a0 -> Pi a a0 #

(|*|) :: Pi a (a0 -> b) -> Pi a a0 -> Pi a b #

Category Pi Source # 
Instance details

Defined in Database.Relational.Pi.Unsafe

Methods

id :: Pi a a #

(.) :: Pi b c -> Pi a b -> Pi a c #

ProductIsoEmpty (Pi a) () Source # 
Instance details

Defined in Database.Relational.Pi.Unsafe

Methods

pureE :: Pi a () #

peRight :: Pi a (a0, ()) -> Pi a a0 #

peLeft :: Pi a ((), a0) -> Pi a a0 #

PersistableWidth r0 => Show (Pi r0 r1) Source # 
Instance details

Defined in Database.Relational.Pi.Unsafe

Methods

showsPrec :: Int -> Pi r0 r1 -> ShowS #

show :: Pi r0 r1 -> String #

showList :: [Pi r0 r1] -> ShowS #

(<.>) :: Pi a b -> Pi b c -> Pi a c infixl 8 Source #

Compose projection path.

(<?.>) :: Pi a (Maybe b) -> Pi b c -> Pi a (Maybe c) infixl 8 Source #

Compose projection path. Maybe phantom functor is map-ed.

(<?.?>) :: Pi a (Maybe b) -> Pi b (Maybe c) -> Pi a (Maybe c) infixl 8 Source #

Compose projection path. Maybe phantom functors are join-ed like >=>.

id' :: Pi a a Source #

Identity projection path.

Low-level API

expandIndexes' :: PersistableRecordWidth a -> Pi a b -> [Int] Source #

Expand indexes from key.

expandIndexes :: PersistableWidth a => Pi a b -> [Int] Source #

Expand indexes from key. Infered width version.