db

package
v0.0.0-...-fe78ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyMatchIDs = errors.New("empty match IDs")
)
View Source
var (
	ErrEmptyPlayerFilters = errors.New("empty filters")
)

Functions

func Eq

func Eq(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func FindMatchIDs

func FindMatchIDs(db *gorm.DB, filters FindMatchIDsFilters) (nscol.MatchIDs, error)

func Group

func Group(db *gorm.DB, model models.Model, col string) *gorm.DB

func Gt

func Gt(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func GtEq

func GtEq(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func In

func In(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func LoadMatchesData

func LoadMatchesData(db *gorm.DB, matchIDs ...nspb.MatchID) (nsviews.MatchesData, error)

func Lt

func Lt(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func LtEq

func LtEq(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func Neq

func Neq(db *gorm.DB, model models.Model, col string, value interface{}) *gorm.DB

func WhereBinaryOp

func WhereBinaryOp(db *gorm.DB, model models.Model, col string, op string, value interface{}) *gorm.DB

Types

type FindMatchIDsFilters

type FindMatchIDsFilters struct {
	*PlayerFilters
	MinDuration time.Duration
	MaxDuration time.Duration
	Since       time.Time
}

type PlayerFilters

type PlayerFilters struct {
	MatchIDs   nscol.MatchIDs
	AccountIDs nscol.AccountIDs
	HeroIDs    nscol.HeroIDs
}

func (*PlayerFilters) Empty

func (f *PlayerFilters) Empty() bool

func (*PlayerFilters) Filter

func (f *PlayerFilters) Filter(scope *gorm.DB, model models.Model) *gorm.DB

func (*PlayerFilters) Validate

func (f *PlayerFilters) Validate() error

Jump to

Keyboard shortcuts

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