Fix types of exists and listQuery operators.

This commit is contained in:
Kei Hibino 2013-09-03 20:25:44 +09:00
parent a84a7f2b6b
commit b8d517c103
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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'.