dbfantasyleague

package
v0.0.0-...-8bbd0fc Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(d *FantasyLeague) error

Delete deletes a record from the database

func Insert

func Insert(d *FantasyLeague) error

Insert will create a new record in the database

func Save

func Save(s *FantasyLeague) error

func Update

func Update(s *FantasyLeague) error

Update will update a record in the database

Types

type FantasyLeague

type FantasyLeague struct {
	FantasyLeagueID int64               `db:"fantasy_league_id"`
	SeasonID        int64               `db:"season_id"`
	FantasyGameID   int64               `db:"fantasy_game_id"`
	Name            string              `db:"name"`
	Description     database.NullString `db:"description"`
	LeaguePassword  database.NullString `db:"league_password"`
	Visibility      string              `db:"visibility"`
	CreatedDate     time.Time           `db:"created_date"`
	CreatedByUserID int64               `db:"created_by_user_id"`
	Status          string              `db:"status"`
}

func ReadAll

func ReadAll() ([]FantasyLeague, error)

ReadAll reads all records in the database

func ReadAllBySeasonIDFantasyGameID

func ReadAllBySeasonIDFantasyGameID(seasonID, gameID int64, orderBy string) ([]FantasyLeague, error)

ReadAllBySeasonID_FantasyGameID reads all fantasy_leagues in the database for the given seasonID and gameID

func ReadByID

func ReadByID(ID int64) (*FantasyLeague, error)

ReadByID reads by id column

Jump to

Keyboard shortcuts

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