Sum returns different types on different backends.
This commit is contained in:
parent
753e4bccac
commit
60e73c0a0c
@ -323,7 +323,13 @@ main = do
|
|||||||
ret <- select $
|
ret <- select $
|
||||||
from $ \p->
|
from $ \p->
|
||||||
return $ joinV $ sum_ (p ^. PersonAge)
|
return $ joinV $ sum_ (p ^. PersonAge)
|
||||||
|
#if defined(WITH_POSTGRESQL)
|
||||||
|
liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Rational ) ]
|
||||||
|
#elif defined(WITH_MYSQL)
|
||||||
|
liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Double ) ]
|
||||||
|
#else
|
||||||
liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Int) ]
|
liftIO $ ret `shouldBe` [ Value $ Just (36 + 17 + 17 :: Int) ]
|
||||||
|
#endif
|
||||||
|
|
||||||
it "works with avg_" $
|
it "works with avg_" $
|
||||||
run $ do
|
run $ do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user