mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-28 22:44:11 +03:00
examples/HDBC/PostgreSQL: apply updated constraint.
(grafted from f18ddd3b8208c124dbcc210f33d58a240cbb848d)
This commit is contained in:
parent
2f2ca8feda
commit
dc70c7b689
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user