X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FWeather.hs;h=bda29ee2541005efb4ca1eaedcccf77d1231d201;hb=698ab20d3aae8ee6bbdd4b8ec01567f863393093;hp=2561377afebd77f7af1911e2ab47b0e0dc6de732;hpb=53e5e32d40a16923ba1d362f405015c3a679bfeb;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Weather.hs b/src/TSN/XML/Weather.hs index 2561377..bda29ee 100644 --- a/src/TSN/XML/Weather.hs +++ b/src/TSN/XML/Weather.hs @@ -10,6 +10,7 @@ -- that league contains a bunch of listings. -- module TSN.XML.Weather ( + dtd, pickle_message, -- * Tests weather_tests, @@ -25,7 +26,7 @@ import Data.Time ( UTCTime ) import Data.Tuple.Curry ( uncurryN ) import Database.Groundhog ( countAll, - executeRaw, + deleteAll, migrate, runMigration, silentMigrationLogger ) @@ -64,6 +65,13 @@ import Xml ( unsafe_unpickle ) + +-- | The DTD to which this module corresponds. Used to invoke dbimport. +-- +dtd :: String +dtd = "weatherxml.dtd" + + -- -- DB/XML Data types -- @@ -404,8 +412,7 @@ test_on_delete_cascade = 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