postgres

package
v0.0.0-...-5888283 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(pgxpool *pgxpool.Pool) DB

func (DB) GetGameWithID

func (d DB) GetGameWithID(ctx context.Context, id string) (api.Game, error)

func (DB) GetGameWithNBAID

func (d DB) GetGameWithNBAID(ctx context.Context, nbaID string) (api.Game, error)

func (DB) GetGamesWithIDs

func (d DB) GetGamesWithIDs(ctx context.Context, ids []string) ([]api.Game, error)

func (DB) GetPlayerWithID

func (d DB) GetPlayerWithID(ctx context.Context, playerID string) (api.Player, error)

func (DB) GetPlayersWithIDs

func (d DB) GetPlayersWithIDs(ctx context.Context, ids []string) ([]api.Player, error)

func (DB) GetTeamSeasonsWithIDs

func (d DB) GetTeamSeasonsWithIDs(ctx context.Context, teamSeasonIDs []string) ([]api.TeamSeason, error)

func (DB) GetTeamWithID

func (d DB) GetTeamWithID(ctx context.Context, teamID string) (api.Team, error)

func (DB) GetTeamsWithIDs

func (d DB) GetTeamsWithIDs(ctx context.Context, ids []uuid.UUID) ([]api.Team, error)

func (DB) GetTeamsWithNBAIDs

func (d DB) GetTeamsWithNBAIDs(ctx context.Context, ids []int) ([]api.Team, error)

func (DB) List

func (d DB) List(ctx context.Context) ([]api.Game, error)

func (DB) ListPlayers

func (d DB) ListPlayers(ctx context.Context) ([]api.Player, error)

func (DB) ListTeams

func (d DB) ListTeams(ctx context.Context) ([]api.Team, error)

func (DB) NBATeamIDMappings

func (d DB) NBATeamIDMappings(ctx context.Context) (map[string]string, error)

func (DB) UpdateArenas

func (d DB) UpdateArenas(ctx context.Context, arenas []arena.ArenaUpdate) ([]api.Arena, error)

func (DB) UpdateFranchises

func (d DB) UpdateFranchises(ctx context.Context, franchiseUpdates []franchise.FranchiseUpdate) ([]api.Franchise, error)

func (DB) UpdateGameReferees

func (d DB) UpdateGameReferees(ctx context.Context, gameRefereeUpdates []game_referee.GameRefereeUpdate) ([]game_referee.GameReferee, error)

func (DB) UpdateGames

func (d DB) UpdateGames(ctx context.Context, gameUpdates []game.GameUpdate) ([]api.Game, error)

func (DB) UpdateGamesSummary

func (d DB) UpdateGamesSummary(ctx context.Context, gameUpdates []game.GameSummaryUpdate) ([]api.Game, error)

func (DB) UpdateLeagues

func (d DB) UpdateLeagues(ctx context.Context, leagueUpdates []league.LeagueUpdate) ([]league.League, error)

func (DB) UpdatePlayByPlays

func (d DB) UpdatePlayByPlays(ctx context.Context, playByPlayUpdates []playbyplay.PlayByPlayUpdate) ([]api.PlayByPlay, error)

func (DB) UpdatePlayers

func (d DB) UpdatePlayers(ctx context.Context, players []api.Player) ([]api.Player, error)

func (DB) UpdateReferees

func (d DB) UpdateReferees(ctx context.Context, refereeUpdates []referee.RefereeUpdate) ([]api.Referee, error)

func (DB) UpdateScheduledGames

func (d DB) UpdateScheduledGames(ctx context.Context, gameUpdates []game.GameScheduledUpdate) ([]api.Game, error)

func (DB) UpdateSeasonWeeks

func (d DB) UpdateSeasonWeeks(ctx context.Context, seasonWeekUpdates []season.SeasonWeekUpdate) ([]season.SeasonWeek, error)

func (DB) UpdateSeasons

func (d DB) UpdateSeasons(ctx context.Context, seasonUpdates []season.SeasonUpdate) ([]season.Season, error)

func (DB) UpdateTeamGameStatsTotals

func (d DB) UpdateTeamGameStatsTotals(ctx context.Context, teamGameStatsTotalsUpdates []team_game_stats.TeamGameStatsTotalUpdate) ([]team_game_stats.TeamGameStatsTotal, error)

func (DB) UpdateTeamGameStatsTotalsOld

func (d DB) UpdateTeamGameStatsTotalsOld(ctx context.Context, teamGameStatsTotalsUpdates []team_game_stats.TeamGameStatsTotalUpdateOld) ([]team_game_stats.TeamGameStatsTotal, error)

func (DB) UpdateTeamSeasons

func (d DB) UpdateTeamSeasons(ctx context.Context, teamSeasonUpdates []team_season.TeamSeasonUpdate) ([]api.TeamSeason, error)

func (DB) UpdateTeams

func (d DB) UpdateTeams(ctx context.Context, teams []team.TeamUpdate) ([]api.Team, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL