rvv041 - Code Optimizations
getABookRec function commented out from DB.hs abaddresses state renamed to abAddresses
This commit is contained in:
parent
d57ac5db14
commit
772025e317
1 changed files with 9 additions and 9 deletions
|
@ -1504,15 +1504,15 @@ updateAdrsInAdrBook pool d a ia = do
|
||||||
where_ $ ab ^. AddressBookAbaddress ==. val ia
|
where_ $ ab ^. AddressBookAbaddress ==. val ia
|
||||||
|
|
||||||
-- | Get one AddrssBook record using the Address as a key
|
-- | Get one AddrssBook record using the Address as a key
|
||||||
getABookRec :: ConnectionPool -> T.Text -> IO [Entity AddressBook]
|
-- getABookRec :: ConnectionPool -> T.Tex t -> IO (Maybe (Entity AddressBook))
|
||||||
getABookRec pool a = do
|
-- getABookRec pool a = do
|
||||||
runNoLoggingT $
|
-- runNoLoggingT $
|
||||||
PS.retryOnBusy $
|
-- PS.retryOnBusy $
|
||||||
flip PS.runSqlPool pool $
|
-- flip PS.runSqlPool pool $
|
||||||
select $ do
|
-- select $ do
|
||||||
adrbook <- from $ table @AddressBook
|
-- adrbook <- from $ table @AddressBook
|
||||||
where_ ((adrbook ^. AddressBookAbaddress) ==. val a)
|
-- where_ ((adrbook ^. AddressBookAbaddress) ==. val a)
|
||||||
return adrbook
|
-- return adrbook
|
||||||
|
|
||||||
-- | delete an existing address from AddressBook
|
-- | delete an existing address from AddressBook
|
||||||
deleteAdrsFromAB :: ConnectionPool -> T.Text -> IO ()
|
deleteAdrsFromAB :: ConnectionPool -> T.Text -> IO ()
|
||||||
|
|
Loading…
Reference in a new issue