Documentation ¶
Overview ¶
Package loader uses the functions and types from jsontypes to upload the json files to a mongodb server
Index ¶
- func CreateFavorites(uri string) error
- func DropRetrosheet(uri string) error
- func LoadEjections(uri, fname string) error
- func LoadGameLog(uri string, fname string) error
- func LoadGamesAll(uri, dirname string) error
- func LoadGamesIndividually(uri, dirname string) error
- func LoadParks(uri, fname string) error
- func LoadPersonnel(uri string, fname string) error
- func LoadPlayerTeams(uri, fname string) error
- func LoadTeams(uri, fname string) error
- func PopulateRetrosheet(dirname string, mongodbURI string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFavorites ¶
CreateFavorites creates the empty 'favorites' collections to hold client choices
func DropRetrosheet ¶
DropRetrosheet drop the retrosheet database in prep for repopulation
func LoadEjections ¶
LoadEjections loads the ejections.json file
func LoadGameLog ¶
LoadGameLog loads a single gamelog file gamelog files are organized by year there are many gamelog files each containing multiple games
func LoadGamesAll ¶
LoadGamesAll : loads ALL gamelog files from the specified directory the games are consoldated into one long array and then uploaded as a single unit. This works if you have enough RAM to support a large upload gamelog files are organized by year there are many gamelog files each containing multiple games Note : as of the date of this file, there are over 200,000 games in all the gamelogs, so this function can take several seconds to execute
func LoadGamesIndividually ¶
LoadGamesIndividually : loads ALL gamelog files from the specified directory it uploads to mongodb one record at a time. this is useful when the system is memory constrained. It can take longer than LoadGamesAll gamelog files are organized by year there are many gamelog files each containing multiple games Note : as of the date of this file, there are over 200,000 games in all the gamelogs, so this function can take several seconds to execute
func PopulateRetrosheet ¶
PopulateRetrosheet is used to repopulate the complete retrosheet database it drops the existing db and reloads personnel, teams and games it requires the file and directory names for the data files
Types ¶
This section is empty.