Copyright | 2013-2019 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Database.Relational.Pi.Unsafe
Contents
Description
This module defines typed projection path objects. Contains internal structure and unsafe interfaces.
Synopsis
- data Pi r0 r1
- width' :: PersistableWidth r => Pi r ct -> PersistableRecordWidth ct
- width :: PersistableWidth r => Pi r a -> Int
- (<.>) :: Pi a b -> Pi b c -> Pi a c
- (<?.>) :: Pi a (Maybe b) -> Pi b c -> Pi a (Maybe c)
- (<?.?>) :: Pi a (Maybe b) -> Pi b (Maybe c) -> Pi a (Maybe c)
- pi :: PersistableRecordWidth r0 -> Pi r0 r1 -> [a] -> [a]
- definePi :: PersistableWidth r1 => Int -> Pi r0 r1
- defineDirectPi' :: PersistableRecordWidth r1 -> [Int] -> Pi r0 r1
- defineDirectPi :: PersistableWidth r1 => [Int] -> Pi r0 r1
- expandIndexes' :: PersistableRecordWidth a -> Pi a b -> [Int]
- expandIndexes :: PersistableWidth a => Pi a b -> [Int]
- unsafeExpandIndexes' :: PersistableRecordWidth a -> Pi a b -> [Int]
- unsafeExpandIndexes :: PersistableWidth a => Pi a b -> [Int]
Projection path
Projection path from type r0
into type r1
.
This type also indicate key object which type is r1
for record type r0
.
Instances
Category Pi Source # | |
HasProjection l a b => IsLabel l (Pi a b) Source # | Derive |
Defined in Database.Relational.OverloadedProjection | |
ProductIsoApplicative (Pi a) Source # | Compose projection path |
Defined in Database.Relational.Pi.Unsafe | |
ProductIsoFunctor (Pi a) Source # | Map projection path |
Defined in Database.Relational.Pi.Unsafe Methods (|$|) :: ProductConstructor (a0 -> b) => (a0 -> b) -> Pi a a0 -> Pi a b # | |
ProductIsoEmpty (Pi a) () Source # | |
PersistableWidth r0 => Show (Pi r0 r1) Source # | |
width' :: PersistableWidth r => Pi r ct -> PersistableRecordWidth ct Source #
Get record width proof object.
(<?.?>) :: 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 >=>
.
pi :: PersistableRecordWidth r0 -> Pi r0 r1 -> [a] -> [a] Source #
Unsafely project untyped value list.
Arguments
:: PersistableWidth r1 | |
=> Int | Index of flat SQL value list |
-> Pi r0 r1 | Result projection path |
Unsafely define projection path from type r0
into type r1
.
Use inferred PersistableRecordWidth
.
Arguments
:: PersistableRecordWidth r1 | |
-> [Int] | Indexes of flat SQL value list |
-> Pi r0 r1 | Result projection path |
Unsafely define projection path from type r0
into type r1
.
Arguments
:: PersistableWidth r1 | |
=> [Int] | Indexes of flat SQL value list |
-> Pi r0 r1 | Result projection path |
Unsafely define projection path from type r0
into type r1
.
Use inferred PersistableRecordWidth
.
expandIndexes' :: PersistableRecordWidth a -> Pi a b -> [Int] Source #
Expand indexes from key.
expandIndexes :: PersistableWidth a => Pi a b -> [Int] Source #
Expand indexes from key. Inferred width version.
Deprecated
unsafeExpandIndexes' :: PersistableRecordWidth a -> Pi a b -> [Int] Source #
Deprecated: Use expandIndexes' instead of this.
unsafeExpandIndexes :: PersistableWidth a => Pi a b -> [Int] Source #
Deprecated: use expandIndexes instead of this.