xpWrap )
-- Local imports.
+import Misc ( double_just )
import TSN.Codegen ( tsn_codegen_config )
import TSN.Database ( insert_or_select )
import TSN.DbImport ( DbImport(..), ImportResult(..), run_dbmigrate )
where
from_tuple (x,y,z) = ScoreGameStatus x (join y) z
to_tuple' ScoreGameStatus{..} =
- (db_status_numeral, s, db_status_text)
- where
- s = case db_status_type of
- Nothing -> Nothing
- Just _ -> Just db_status_type
+ (db_status_numeral, double_just db_status_type, db_status_text)
-- | Convert a 'ScoreGameXml' to/from \<game\>.
(xpOption xpText) -- Team name
where
from_tuple (x,y,z)= HTeamXml (HTeam (Team x Nothing z)) (join y)
- to_tuple' (HTeamXml (HTeam t) Nothing) = (team_id t, Nothing, name t)
- to_tuple' (HTeamXml (HTeam t) jhp) = (team_id t, Just jhp, name t)
+ to_tuple' (HTeamXml (HTeam t) jhp) = (team_id t, double_just jhp, name t)