X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuriesDetail.hs;h=9c6ae5daf246ff63cf90a312061f3bf3cda8a1d7;hb=cb5fd814ce4dbb761ebbff4771f16d97b1910173;hp=e5d572e7a504f37f0ed994d1c495bfd55bc41407;hpb=4595387816651b26e4c163e5c416c5caa01d17cf;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/InjuriesDetail.hs b/src/TSN/XML/InjuriesDetail.hs index e5d572e..9c6ae5d 100644 --- a/src/TSN/XML/InjuriesDetail.hs +++ b/src/TSN/XML/InjuriesDetail.hs @@ -2,7 +2,6 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} @@ -13,6 +12,7 @@ -- real meat. -- module TSN.XML.InjuriesDetail ( + dtd, pickle_message, -- * Tests injuries_detail_tests, @@ -29,7 +29,7 @@ import Data.Tuple.Curry ( uncurryN ) import Database.Groundhog ( DefaultKey, countAll, - executeRaw, + deleteAll, migrate, runMigration, silentMigrationLogger ) @@ -67,6 +67,13 @@ import Xml ( unsafe_unpickle ) + +-- | The DTD to which this module corresponds. Used to invoke dbimport. +-- +dtd :: String +dtd = "Injuries_Detail_XML.dtd" + + -- -- Data types -- @@ -455,8 +462,7 @@ test_on_delete_cascade = testGroup "cascading delete tests" 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