dbposition

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(d *Position) error

Delete deletes a record from the database

func Insert

func Insert(d *Position) error

Insert will create a new record in the database

func Save

func Save(s *Position) error

func Update

func Update(s *Position) error

Update will update a record in the database

Types

type Position

type Position struct {
	PositionID int64               `db:"position_id"`
	SportID    int64               `db:"sport_id"`
	Name       string              `db:"name"`
	NameLong   database.NullString `db:"name_long"`
}

func ReadAll

func ReadAll() ([]Position, error)

ReadAll reads all records in the database

func ReadByID

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

ReadByID reads by id column

func ReadByNameAndSportID

func ReadByNameAndSportID(name string, sportId int64) (*Position, error)

ReadByNameAndSportID reads by name and sport_id columns

Jump to

Keyboard shortcuts

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