dbseason

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(s *Season) error

Delete deletes a season from the database

func Insert

func Insert(s *Season) error

Insert will create a new record in the database

func Save

func Save(s *Season) error

func Update

func Update(s *Season) error

Update will update a record in the database

Types

type Season

type Season struct {
	SeasonID     int64              `db:"season_id"`
	Name         string             `db:"name"`
	StartingYear database.NullInt64 `db:"starting_year"`
	SportLevelID int64              `db:"sport_level_id"`
	Status       string             `db:"status"`
}

func ReadAll

func ReadAll(orderBy string) ([]Season, error)

ReadAll reads all seasons in the database

func ReadByID

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

ReadByID reads season by id column

func ReadCurrentSeason

func ReadCurrentSeason(year, sportLevelId int64) (*Season, error)

ReadCurrentSeason reads season by year and sportlevelid

type SeasonSportLevel

type SeasonSportLevel struct {
	SeasonID     int64              `db:"season_id"`
	Name         string             `db:"name"`
	StartingYear database.NullInt64 `db:"starting_year"`
	SportLevelID int64              `db:"sport_level_id"`
	Status       string             `db:"status"`
	SportID      int64              `db:"sport_id"`
	SportLevel   string             `db:"level"`
	SportName    string             `db:"sport_name"`
}

func ReadAllWithSportLevel

func ReadAllWithSportLevel(orderBy string) ([]SeasonSportLevel, error)

ReadAll reads all seasons in the database and the matching sportlevel and sport data

func ReadByIDWithSportLevel

func ReadByIDWithSportLevel(ID int64) (*SeasonSportLevel, error)

ReadByIDWithSportLevel reads season by id column

Jump to

Keyboard shortcuts

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