sqlc

package
v0.0.0-...-28da3af Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuerierCtxTimeout = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

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 GameServerAnalytic

type GameServerAnalytic struct {
	ServerIp      pqtype.Inet `json:"server_ip"`
	GamesCreated  int64       `json:"games_created"`
	RematchCalled int64       `json:"rematch_called"`
	LastUpdated   time.Time   `json:"last_updated"`
}

type Querier

type Querier interface {
	AnalyticsGetGamesCreatedCount(ctx context.Context, serverIp pqtype.Inet) (int64, error)
	AnalyticsGetRematchCalledCount(ctx context.Context, serverIp pqtype.Inet) (int64, error)
	AnalyticsIncrementGamesCreatedCount(ctx context.Context, serverIp pqtype.Inet) error
	AnalyticsIncrementRematchCalledCount(ctx context.Context, serverIp pqtype.Inet) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AnalyticsGetGamesCreatedCount

func (q *Queries) AnalyticsGetGamesCreatedCount(ctx context.Context, serverIp pqtype.Inet) (int64, error)

func (*Queries) AnalyticsGetRematchCalledCount

func (q *Queries) AnalyticsGetRematchCalledCount(ctx context.Context, serverIp pqtype.Inet) (int64, error)

func (*Queries) AnalyticsIncrementGamesCreatedCount

func (q *Queries) AnalyticsIncrementGamesCreatedCount(ctx context.Context, serverIp pqtype.Inet) error

func (*Queries) AnalyticsIncrementRematchCalledCount

func (q *Queries) AnalyticsIncrementRematchCalledCount(ctx context.Context, serverIp pqtype.Inet) 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