dbsportlevel

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 AMATEUR_GOLF = 5
View Source
const COLLEGE_BASKETBALL = 3
View Source
const COLLEGE_FOOTBALL = 2
View Source
const LEVEL_AMATEUR = "amateur"
View Source
const LEVEL_PRO = "pro"
View Source
const PRO_FOOTBALL = 1
View Source
const PRO_GOLF = 4

Variables

This section is empty.

Functions

func Delete

func Delete(d *SportLevel) error

Delete deletes a record from the database

func Insert

func Insert(d *SportLevel) error

Insert will create a new record in the database

func Save

func Save(s *SportLevel) error

func Update

func Update(s *SportLevel) error

Update will update a record in the database

Types

type SportLevel

type SportLevel struct {
	SportLevelID int64  `db:"sport_level_id"`
	SportID      int64  `db:"sport_id"`
	Level        string `db:"level"`
	CurrentYear  int64  `db:"current_year"`
}

func ReadAll

func ReadAll() ([]SportLevel, error)

ReadAll reads all records in the database

func ReadByID

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

ReadByID reads by id column

type SportLevelFull

type SportLevelFull struct {
	SportLevelID int64  `db:"sport_level_id"`
	SportID      int64  `db:"sport_id"`
	SportLevel   string `db:"level"`
	SportName    string `db:"name"`
}

func ReadAllFull

func ReadAllFull(orderBy string) ([]SportLevelFull, error)

ReadAllFull reads all records in the database, including the sport name

func ReadByIDFull

func ReadByIDFull(ID int64) (*SportLevelFull, error)

ReadByIDFull reads by id column and also includes sport table info

Jump to

Keyboard shortcuts

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