mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-02 08:12:49 +03:00
19 lines
441 B
Haskell
19 lines
441 B
Haskell
{-# LANGUAGE FlexibleContexts #-}
|
|
{-# LANGUAGE Arrows #-}
|
|
|
|
import Control.Arrow
|
|
import ArrowQuery
|
|
|
|
import Person (Person, person)
|
|
import Birthday (Birthday, birthday)
|
|
import qualified Person
|
|
import qualified Birthday
|
|
|
|
|
|
personAndJoinA :: QuerySimple () (Projection Flat (Person, Birthday))
|
|
personAndJoinA = proc () -> do
|
|
p <- query -< person
|
|
b <- query -< birthday
|
|
wheres -< p ! Person.name' .=. b ! Birthday.name'
|
|
returnA -< p >< b
|