examples/HDBC/PostgreSQL: apply updated constraint.

(grafted from f18ddd3b8208c124dbcc210f33d58a240cbb848d)
This commit is contained in:
Kei Hibino 2017-07-20 02:00:52 +09:00
parent 2f2ca8feda
commit dc70c7b689

View File

@ -87,7 +87,8 @@ newOrange = StockGoods 2 "Orange" 150 10
keyUpdateUidName :: KeyUpdate (Int32, String) StockGoods
keyUpdateUidName = derivedKeyUpdate $ seq' >< name'
runKeyUpdateAndPrint :: ToSql SqlValue a => KeyUpdate p a -> a -> IO ()
runKeyUpdateAndPrint :: (PersistableWidth a, ToSql SqlValue a)
=> KeyUpdate p a -> a -> IO ()
runKeyUpdateAndPrint ku r = handleConnectionIO connect $ \conn -> do
putStrLn $ "SQL: " ++ show ku
rv <- runKeyUpdate conn ku r