Documentation
¶
Index ¶
- func AddPartido(m *Partido) (id int64, err error)
- func AddPosicion(m *Posicion) (id int64, err error)
- func DeletePartido(id int) (err error)
- func DeletePosicion(id int) (err error)
- func GetAllPartido(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllPosicion(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func UpdatePartidoById(m *Partido) (err error)
- func UpdatePosicionById(m *Posicion) (err error)
- type Partido
- type Posicion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPartido ¶
AddPartido insert a new Partido into database and returns last inserted Id on success.
func AddPosicion ¶
AddPosicion insert a new Posicion into database and returns last inserted Id on success.
func DeletePartido ¶
DeletePartido deletes Partido by Id and returns error if the record to be deleted doesn't exist
func DeletePosicion ¶
DeletePosicion deletes Posicion by Id and returns error if the record to be deleted doesn't exist
func GetAllPartido ¶
func GetAllPartido(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllPartido retrieves all Partido matches certain condition. Returns empty list if no records exist
func GetAllPosicion ¶
func GetAllPosicion(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllPosicion retrieves all Posicion matches certain condition. Returns empty list if no records exist
func UpdatePartidoById ¶
UpdatePartido updates Partido by Id and returns error if the record to be updated doesn't exist
func UpdatePosicionById ¶
UpdatePosicion updates Posicion by Id and returns error if the record to be updated doesn't exist
Types ¶
type Partido ¶
type Partido struct {
Id int `orm:"column(id);pk;auto"`
EquipoLocalId int `orm:"column(equipo_local_id)"`
EquipoVisitanteId int `orm:"column(equipo_visitante_id)"`
PuntajeLocal int `orm:"column(puntaje_local)"`
PuntajeVisitante int `orm:"column(puntaje_visitante)"`
Fecha time.Time `orm:"column(fecha);type(date)"`
CiudadId int `orm:"column(ciudad_id)"`
}
func GetPartidoById ¶
GetPartidoById retrieves Partido by Id. Returns error if Id doesn't exist
type Posicion ¶
type Posicion struct {
Id int `orm:"column(id);pk;auto"`
EquipoId int `orm:"column(equipo_id)"`
Puesto int `orm:"column(puesto)"`
PartidoJugado int `orm:"column(partido_jugado)"`
PartidoGanado int `orm:"column(partido_ganado)"`
PartidoEmpatado int `orm:"column(partido_empatado)"`
PartidoPerdido int `orm:"column(partido_perdido)"`
CantidadPuntaje int `orm:"column(cantidad_puntaje)"`
}
func GetPosicionById ¶
GetPosicionById retrieves Posicion by Id. Returns error if Id doesn't exist