mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-29 06:37:03 +03:00
Drop examples of deprecated functions.
This commit is contained in:
parent
191130668c
commit
8680e03165
@ -26,15 +26,6 @@ groupMemberShip =
|
||||
, () <- on $ m ?! groupId' .=. just (g ! Group.id')
|
||||
]
|
||||
|
||||
groupMemberShipE :: Relation () (Maybe Membership, Group)
|
||||
groupMemberShipE =
|
||||
relation
|
||||
[ m >< g
|
||||
| m <- queryMaybe membership
|
||||
, g <- query group
|
||||
, () <- onE $ m .! groupId' .=. g ! Group.id'
|
||||
]
|
||||
|
||||
-- Monadic join style
|
||||
userGroup0 :: Relation () (Maybe User, Maybe Group)
|
||||
userGroup0 =
|
||||
@ -82,18 +73,6 @@ userGroup0' =
|
||||
]
|
||||
|
||||
|
||||
userGroup0E :: Relation () (Maybe User, Maybe Group)
|
||||
userGroup0E =
|
||||
relation
|
||||
[ u >< mg ?! snd'
|
||||
| u <- queryMaybe user
|
||||
, mg <- queryMaybe groupMemberShipE
|
||||
|
||||
, () <- onE $ u .! User.id' .=. mg ?!? fst' .! userId'
|
||||
|
||||
, () <- asc $ u ?! User.id'
|
||||
]
|
||||
|
||||
haskellUser :: Relation () (String, Maybe String)
|
||||
haskellUser =
|
||||
relation
|
||||
@ -157,23 +136,6 @@ userGroup2 =
|
||||
, () <- asc $ u ?! User.id'
|
||||
]
|
||||
|
||||
userGroup2E :: Relation () (Maybe User, Maybe Group)
|
||||
userGroup2E =
|
||||
relation
|
||||
[ u >< mg ?! snd'
|
||||
| u <- queryMaybe user
|
||||
, mg <- queryMaybe . relation $
|
||||
[ m >< g
|
||||
| m <- queryMaybe membership
|
||||
, g <- query group
|
||||
, () <- onE $ m .! groupId' .=. g ! Group.id'
|
||||
]
|
||||
|
||||
, () <- onE $ u .! User.id' .=. mg ?!? fst' .! userId'
|
||||
|
||||
, () <- asc $ u ?! User.id'
|
||||
]
|
||||
|
||||
-- Aggregation
|
||||
userGroupAggregate0 :: Relation () ((Maybe String, Int64), Maybe Bool)
|
||||
userGroupAggregate0 =
|
||||
|
@ -41,12 +41,9 @@ run = handleSqlError' $ withConnectionIO connect
|
||||
run' userGroup0 ()
|
||||
run' haskUserGroup ()
|
||||
run' userGroup0' ()
|
||||
run' userGroup0E ()
|
||||
run' haskellUser ()
|
||||
run' userGroup1 ()
|
||||
-- run' userGroup1E ()
|
||||
run' userGroup2 ()
|
||||
run' userGroup2E ()
|
||||
run' userGroupAggregate0 ()
|
||||
run' userGroupAggregate1 ()
|
||||
run' userGroupAggregate2 ()
|
||||
|
Loading…
Reference in New Issue
Block a user