Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DivisionRecord ¶
DivisionRecord is the specific data record for each division in a league
func (*DivisionRecord) CreateTable ¶
func (dR *DivisionRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*DivisionRecord) FileOutput ¶
func (dR *DivisionRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*DivisionRecord) ScreenOutput ¶
func (dR *DivisionRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*DivisionRecord) UpdateRecord ¶
func (dR *DivisionRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type GameRecord ¶
type GameRecord struct {
RecordName string
EffectiveDate time.Time
ID int64
ResumeDate string
OriginalDate string
GameType string
Tiebreaker string
GameDay string
DoubleHeader string
GameNumber int
TBDFlag string
Interleague string
ScheduledInnings int
Description string
VenueID int64
AwayTeamID int64
HomeTeamID int64
}
GameRecord is the specific data record for a game
func (*GameRecord) CreateTable ¶
func (gR *GameRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*GameRecord) FileOutput ¶
func (gR *GameRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*GameRecord) ScreenOutput ¶
func (gR *GameRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*GameRecord) UpdateRecord ¶
func (gR *GameRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type GameStatusRecord ¶
type GameStatusRecord struct {
RecordName string
EffectiveDate time.Time
ID int64
Status string
Ind string
Reason string
CurrentInning int
TopOfInning bool
Balls int
Strikes int
Outs int
InningState string
Note string
PerfectGame bool
NoHitter bool
AwayTeamRuns int
HomeTeamRuns int
AwayTeamHits int
HomeTeamHits int
AwayTeamErrors int
HomeTeamErrors int
AwayTeamHR int
HomeTeamHR int
AwayTeamSB int
HomeTeamSB int
AwayTeamSO int
HomeTeamSO int
Innings []InningScoreRecord
}
GameStatusRecord is the specific data about the game
func (*GameStatusRecord) CreateTable ¶
func (gsR *GameStatusRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*GameStatusRecord) FileOutput ¶
func (gsR *GameStatusRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*GameStatusRecord) ScreenOutput ¶
func (gsR *GameStatusRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*GameStatusRecord) UpdateRecord ¶
func (gsR *GameStatusRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type InningScoreRecord ¶
type InningScoreRecord struct {
RecordName string
EffectiveDate time.Time
GameID int64
Inning int
AwayTeamRuns int
HomeTeamRuns int
}
InningScoreRecord is the specific data about an inning in a game
func (*InningScoreRecord) CreateTable ¶
func (isR *InningScoreRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*InningScoreRecord) FileOutput ¶
func (isR *InningScoreRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*InningScoreRecord) ScreenOutput ¶
func (isR *InningScoreRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*InningScoreRecord) UpdateRecord ¶
func (isR *InningScoreRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type LeagueRecord ¶
type LeagueRecord struct {
RecordName string
EffectiveDate time.Time
ID int64
Name string
SportCode string
}
LeagueRecord is the specific data record for each league
func (*LeagueRecord) CreateTable ¶
func (lR *LeagueRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*LeagueRecord) FileOutput ¶
func (lR *LeagueRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*LeagueRecord) ScreenOutput ¶
func (lR *LeagueRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*LeagueRecord) UpdateRecord ¶
func (lR *LeagueRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type Records ¶
type Records interface {
ScreenOutput()
FileOutput(*os.File)
CreateTable(*sql.DB)
UpdateRecord(*sql.DB)
}
Records defines the methods that all record types must implement
type StandingRecord ¶
type StandingRecord struct {
RecordName string
EffectiveDate time.Time
TeamID int64
Wins int
Losses int
GamesBack string
WildcardGamesBack string
}
StandingRecord is the specific data record for a team standing in
its division in its league
func (*StandingRecord) CreateTable ¶
func (sR *StandingRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*StandingRecord) FileOutput ¶
func (sR *StandingRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*StandingRecord) ScreenOutput ¶
func (sR *StandingRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*StandingRecord) UpdateRecord ¶
func (sR *StandingRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type TeamRecord ¶
type TeamRecord struct {
RecordName string
EffectiveDate time.Time
ID int64
Name string
Code string
City string
LeagueID int64
Division string
}
TeamRecord is the specifc data record for each team in a league
func (*TeamRecord) CreateTable ¶
func (tR *TeamRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*TeamRecord) FileOutput ¶
func (tR *TeamRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*TeamRecord) ScreenOutput ¶
func (tR *TeamRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*TeamRecord) UpdateRecord ¶
func (tR *TeamRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records
type VenueRecord ¶
type VenueRecord struct {
RecordName string
EffectiveDate time.Time
ID int64
Name string
Location string
Channel string
}
VenueRecord is the specific data record for each venue
func (*VenueRecord) CreateTable ¶
func (vR *VenueRecord) CreateTable(db *sql.DB)
CreateTable will create the requisite database table
func (*VenueRecord) FileOutput ¶
func (vR *VenueRecord) FileOutput(filePtr *os.File)
FileOutput displays the record on the screen
func (*VenueRecord) ScreenOutput ¶
func (vR *VenueRecord) ScreenOutput()
ScreenOutput displays the record on the screen
func (*VenueRecord) UpdateRecord ¶
func (vR *VenueRecord) UpdateRecord(db *sql.DB)
UpdateRecord is the way data gets into the database. It does not act like
the UPSERT command because the effective date field will be different for each record. Each table in the database will have different rules for how to deal with data records