Closed khibino closed 7 years ago
HRR code as follows:
import Data.Int import Database.Relational.Query caseRecord :: Relation () Int32 caseRecord = relation $ do return $ case' (value (1 :: Int32)) [ (value 1 , (,) |$| value 1 |*| value "foo") ] ((,) |$| value 0 |*| value "other") ! fst' .*. value 10 main :: IO () main = print caseRecord
output is:
SELECT ALL (CASE 1 WHEN 1 THEN (1, 'foo') ELSE (0, 'other') END * 10) AS f0
Fixed in https://github.com/khibino/haskell-relational-record/commit/4805e10bb5d2698392bddf7882033606c4430dee and https://github.com/khibino/haskell-relational-record/commit/406c42a063ae746786dd4f926c228dfcff30e82a
Fixed versions are uploaded. http://hackage.haskell.org/package/relational-query-0.8.3.8 http://hackage.haskell.org/package/relational-query-0.9.0.2
HRR code as follows:
output is: