players_gen

package
v0.0.0-...-7c98acb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPlayerParams

type AddPlayerParams struct {
	ID      string
	TeamID  string
	SteamID uint64
	Name    string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Player

type Player struct {
	ID      string
	TeamID  string
	SteamID uint64
	Name    string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddPlayer

func (q *Queries) AddPlayer(ctx context.Context, arg AddPlayerParams) (sql.Result, error)

func (*Queries) GetPlayer

func (q *Queries) GetPlayer(ctx context.Context, id string) (Player, error)

func (*Queries) GetPlayerBySteamID

func (q *Queries) GetPlayerBySteamID(ctx context.Context, steamID uint64) (Player, error)

func (*Queries) GetPlayersByTeam

func (q *Queries) GetPlayersByTeam(ctx context.Context, teamID string) ([]Player, error)

func (*Queries) GetPlayersByTeams

func (q *Queries) GetPlayersByTeams(ctx context.Context, teamIds []string) ([]Player, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

Jump to

Keyboard shortcuts

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