rvv041 #82

Merged
pitmutt merged 30 commits from rvv041 into milestone2 2024-06-07 20:03:06 +00:00
Showing only changes of commit 772025e317 - Show all commits

View file

@ -1504,15 +1504,15 @@ updateAdrsInAdrBook pool d a ia = do
where_ $ ab ^. AddressBookAbaddress ==. val ia
-- | Get one AddrssBook record using the Address as a key
getABookRec :: ConnectionPool -> T.Text -> IO [Entity AddressBook]
getABookRec pool a = do
runNoLoggingT $
PS.retryOnBusy $
flip PS.runSqlPool pool $
select $ do
adrbook <- from $ table @AddressBook
where_ ((adrbook ^. AddressBookAbaddress) ==. val a)
return adrbook
-- getABookRec :: ConnectionPool -> T.Tex t -> IO (Maybe (Entity AddressBook))
-- getABookRec pool a = do
pitmutt marked this conversation as resolved Outdated

If this function is intended to provide only one record, it should return a IO (Maybe (Entity AddressBook))

If this function is intended to provide only one record, it should return a `IO (Maybe (Entity AddressBook))`
-- runNoLoggingT $
-- PS.retryOnBusy $
-- flip PS.runSqlPool pool $
-- select $ do
-- adrbook <- from $ table @AddressBook
-- where_ ((adrbook ^. AddressBookAbaddress) ==. val a)
-- return adrbook
-- | delete an existing address from AddressBook
deleteAdrsFromAB :: ConnectionPool -> T.Text -> IO ()