Skip to content

Commit

Permalink
save whole hackage db in one transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
JPMoresmau committed Mar 2, 2012
1 parent dabbcbe commit ff28896
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Scion/PersistentBrowser/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ saveHackageDatabase file = withTemporaryDirectory (saveHackageDatabaseWithTmp fi

saveHackageDatabaseWithTmp :: FilePath -> FilePath -> IO ()
saveHackageDatabaseWithTmp file tmp = do (db, _) <- createHackageDatabase tmp
mapM_ (\pkg -> withSqliteConn (T.pack file) (runSqlConn (savePackageToDb pkg))) db
withSqliteConn (T.pack file) (runSqlConn (mapM_ savePackageToDb db))
--mapM_ (\pkg -> withSqliteConn (T.pack file) (runSqlConn (savePackageToDb pkg))) db

-- | Downloads the information for the entire Hackage database
-- creating an in-memory database with it.
Expand Down

0 comments on commit ff28896

Please sign in to comment.