Set a new lower bound on groundhog for the deleteAll function.
6. Replace boilerplate with regular-xmlpickler.
-7. Replace inline SQL queries with deleteAll.
hslogger == 1.2.*,
htsn-common == 0.0.1,
hxt == 9.3.*,
- groundhog == 0.4.*,
+ -- deleteAll showed up in 0.4.1
+ groundhog >= 0.4.1,
groundhog-postgresql == 0.4.*,
groundhog-sqlite == 0.4.*,
groundhog-th == 0.4.*,
import Data.Tuple.Curry ( uncurryN )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
migrate,
runMigration,
silentMigrationLogger )
migrate b
migrate c
_ <- dbimport sched
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM auto_racing_schedules;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c
import Data.Typeable ( Typeable )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
migrate,
runMigration,
silentMigrationLogger )
migrate a
migrate b
_ <- dbimport inj
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM injuries;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
return $ count_a + count_b
import Database.Groundhog (
DefaultKey,
countAll,
- executeRaw,
+ deleteAll,
migrate,
runMigration,
silentMigrationLogger )
migrate b
migrate c
_ <- dbimport inj
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM injuries_detail;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c
import Data.Typeable ( Typeable )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
insert_,
migrate,
runMigration,
migrate d
migrate e
_ <- dbimport news
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM news;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c
(=.),
(==.),
countAll,
- executeRaw,
+ deleteAll,
insert_,
migrate,
runMigration,
migrate e
migrate f
_ <- dbimport odds
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM odds;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c
import Data.Typeable ( Typeable )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
insert,
insert_,
migrate,
migrate f
_ <- dbimport score
-- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM scores;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c
import Data.Tuple.Curry ( uncurryN )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
migrate,
runMigration,
silentMigrationLogger )
migrate b
migrate c
_ <- dbimport weather
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM weather;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c