mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-24 21:45:38 +00:00
split delete transaction (#620)
This commit is contained in:
@@ -429,7 +429,7 @@ getContactGroupNames st userId Contact {contactId} =
|
||||
|
||||
deleteContact :: MonadUnliftIO m => SQLiteStore -> UserId -> Contact -> m ()
|
||||
deleteContact st userId Contact {contactId, localDisplayName} = do
|
||||
liftIO $ putStrLn "in deleteContact, liftIO . withTransaction st $ \\db -> do"
|
||||
liftIO $ putStrLn "in deleteContact, first liftIO . withTransaction st $ \\db -> do"
|
||||
liftIO . withTransaction st $ \db -> do
|
||||
liftIO $ putStrLn "DB.execute DELETE FROM connections WHERE connection_id IN ..."
|
||||
DB.execute
|
||||
@@ -445,6 +445,8 @@ deleteContact st userId Contact {contactId, localDisplayName} = do
|
||||
(userId, contactId)
|
||||
liftIO $ putStrLn "DB.execute db \"DELETE FROM files WHERE user_id = ? AND contact_id = ?\" (userId, contactId)"
|
||||
DB.execute db "DELETE FROM files WHERE user_id = ? AND contact_id = ?" (userId, contactId)
|
||||
liftIO $ putStrLn "in deleteContact, second liftIO . withTransaction st $ \\db -> do"
|
||||
liftIO . withTransaction st $ \db -> do
|
||||
liftIO $ putStrLn "DB.execute db \"DELETE FROM chat_items WHERE user_id = ? AND contact_id = ?\" (userId, contactId)"
|
||||
DB.execute db "DELETE FROM chat_items WHERE user_id = ? AND contact_id = ?" (userId, contactId)
|
||||
liftIO $ putStrLn "DB.execute db \"DELETE FROM contacts WHERE user_id = ? AND contact_id = ?\" (userId, contactId)"
|
||||
|
||||
Reference in New Issue
Block a user