Commit after insert, but not in test

This commit is contained in:
Joe Nelson
2014-08-12 21:17:43 -07:00
parent 78d82e7fda
commit 66839c012f
2 changed files with 1 additions and 2 deletions
+1
View File
@@ -109,6 +109,7 @@ insert schema table row conn = do
query <- populateSql conn ("insert into %I.%I ("++colIds++")", map toSql $ schema:table:cols)
stmt <- prepare conn (query ++ " values ("++phs++") returning *")
_ <- execute stmt values
commit conn
keys <- getColumnNames stmt
Just vals <- fetchRow stmt
let rowMap = fromList $ zip keys vals