dbweek

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

View Source
const STATUS_ACTIVE = "active"
View Source
const STATUS_FINAL = "final"
View Source
const STATUS_PENDING = "pending"
View Source
const TYPE_FINAL = "final"
View Source
const TYPE_INITIAL = "initial"
View Source
const TYPE_MIDDLE = "middle"

Variables

This section is empty.

Functions

func Delete

func Delete(w *Week) error

Delete deletes a week from the database

func Insert

func Insert(w *Week) error

Insert will create a new record in the database

func Save

func Save(s *Week) error

func Update

func Update(s *Week) error

Update will update a record in the database

Types

type Week

type Week struct {
	WeekID    int64             `db:"week_id"`
	SeasonID  int64             `db:"season_id"`
	WeekName  string            `db:"week_name"`
	StartDate database.NullTime `db:"start_date"`
	EndDate   database.NullTime `db:"end_date"`
	Status    string            `db:"status"`
	WeekType  string            `db:"week_type"`
}

func ReadAll

func ReadAll() ([]Week, error)

ReadAll reads all weeks in the database

func ReadByID

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

ReadByID reads week by id column

func ReadByWeekNameAndSeasonID

func ReadByWeekNameAndSeasonID(weekName string, seasonId int64) (*Week, error)

ReadByWeekNameAndSeasonID reads week by week_name and season_id columns

Jump to

Keyboard shortcuts

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