+ -- | To convert from the XML representation to the database one, we
+ -- drop the home/away teams and the casino lines, but retain the
+ -- home/away rotation numbers.
+ --
+ from_xml OddsGameXml{..} =
+ OddsGame {
+ db_game_id = xml_game_id,
+ db_game_date = xml_game_date,
+ db_game_time = xml_game_time,
+ db_game_away_team_rotation_number =
+ (xml_away_rotation_number xml_game_away_team),
+ db_game_home_team_rotation_number =
+ (xml_home_rotation_number xml_game_home_team) }
+
+-- | This lets us call 'insert_xml' directly on an 'OddsGameXml'
+-- without converting it to the database representation explicitly.
+--