-- so we ignore the probable
-- upper bound of three
-- characters.
- xml_home_team_rotation_number :: Int,
+ xml_home_team_rotation_number :: Maybe Int,
xml_home_team_abbr :: String,
xml_home_team_name :: String,
xml_home_team_starter :: Maybe (Int, String), -- ^ (id, name)
-- on lengthless text fields, so
-- we ignore the probable upper
-- bound of three characters
- xml_away_team_rotation_number :: Int,
+ xml_away_team_rotation_number :: Maybe Int,
xml_away_team_abbr :: String,
xml_away_team_name :: String,
xml_away_team_starter :: Maybe (Int, String), -- ^ (id, name)
db_home_team_id :: DefaultKey Team,
db_game_id :: Int,
db_game_time :: UTCTime, -- ^ Contains both the date and time.
- db_away_team_rotation_number :: Int,
- db_home_team_rotation_number :: Int,
+ db_away_team_rotation_number :: Maybe Int,
+ db_home_team_rotation_number :: Maybe Int,
db_away_team_starter_id :: Maybe Int,
db_away_team_starter_name :: Maybe String,
db_home_team_starter_id :: Maybe Int,
xpWrap (from_tuple, to_tuple) $
xp6Tuple
(xpElem "HomeTeamID" xpText)
- (xpElem "HomeRotationNumber" xpInt)
+ (xpElem "HomeRotationNumber" (xpOption xpInt))
(xpElem "HomeAbbr" xpText)
(xpElem "HomeTeamName" xpText)
(-- This is an ugly way to get both the HStarter ID attribute
xpWrap (from_tuple, to_tuple) $
xp6Tuple
(xpElem "AwayTeamID" xpText)
- (xpElem "AwayRotationNumber" xpInt)
+ (xpElem "AwayRotationNumber" (xpOption xpInt))
(xpElem "AwayAbbr" xpText)
(xpElem "AwayTeamName" xpText)
(-- This is an ugly way to get both the AStarter ID attribute