mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-14 22:32:07 +03:00
Fix types of exists and listQuery operators.
This commit is contained in:
parent
a84a7f2b6b
commit
b8d517c103
@ -237,7 +237,7 @@ not = unsafeUniOp SQLs.not
|
||||
|
||||
-- | Logical operator corresponding SQL /EXISTS/ .
|
||||
exists :: (SqlProjectable p, ProjectableShowSql p)
|
||||
=> ListProjection (Projection Exists) (Maybe Bool) -> p (Maybe Bool)
|
||||
=> ListProjection (Projection Exists) r -> p (Maybe Bool)
|
||||
exists = unsafeProjectSql . paren . SQLs.defineUniOp SQL.EXISTS
|
||||
. unsafeShowSqlListProjection unsafeShowSql
|
||||
|
||||
|
@ -116,15 +116,15 @@ queryMaybe' pr = do
|
||||
queryMaybe :: MonadQualify Qualify m => Relation () r -> m (Projection Flat (Maybe r))
|
||||
queryMaybe = fmap snd . queryMaybe'
|
||||
|
||||
queryList0 :: Relation p r -> ListProjection (Projection Flat) r
|
||||
queryList0 :: Relation p r -> ListProjection (Projection c) r
|
||||
queryList0 = unsafeListProjectionFromSubQuery . evalQualifyPrime . subQueryQualifyFromRelation
|
||||
|
||||
-- | List subQuery, for /IN/ and /EXIST/ with place-holder parameter 'p'.
|
||||
queryList' :: Relation p r -> (PlaceHolders p, ListProjection (Projection Flat) r)
|
||||
queryList' :: Relation p r -> (PlaceHolders p, ListProjection (Projection c) r)
|
||||
queryList' = placeHoldersFromRelation &&& queryList0
|
||||
|
||||
-- | List subQuery, for /IN/ and /EXIST/.
|
||||
queryList :: Relation () r -> ListProjection (Projection Flat) r
|
||||
queryList :: Relation () r -> ListProjection (Projection c) r
|
||||
queryList = queryList0
|
||||
|
||||
-- | Finalize 'QuerySimple' monad and generate 'Relation'.
|
||||
|
Loading…
Reference in New Issue
Block a user