match

package
v0.0.0-...-a77d1df Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the match type in the database.
	Label = "match"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldMatchHash holds the string denoting the match_hash field in the database.
	FieldMatchHash = "match_hash"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldSeason holds the string denoting the season field in the database.
	FieldSeason = "season"
	// FieldCreatedTs holds the string denoting the created_ts field in the database.
	FieldCreatedTs = "created_ts"
	// FieldTurnCount holds the string denoting the turn_count field in the database.
	FieldTurnCount = "turn_count"
	// FieldFetchStatus holds the string denoting the fetch_status field in the database.
	FieldFetchStatus = "fetch_status"
	// EdgeMap holds the string denoting the map edge name in mutations.
	EdgeMap = "map"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// Table holds the table name of the match in the database.
	Table = "matches"
	// MapTable is the table that holds the map relation/edge.
	MapTable = "matches"
	// MapInverseTable is the table name for the OsnMap entity.
	// It exists in this package in order to avoid circular dependency with the "osnmap" package.
	MapInverseTable = "osn_maps"
	// MapColumn is the table column denoting the map relation/edge.
	MapColumn = "osn_map_matches"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "player_role_match"
	// RolesInverseTable is the table name for the PlayerRole entity.
	// It exists in this package in order to avoid circular dependency with the "playerrole" package.
	RolesInverseTable = "player_roles"
)
View Source
const DefaultFetchStatus = FetchStatusLISTED

FetchStatusLISTED is the default value of the FetchStatus enum.

Variables

View Source
var (
	// DefaultSeason holds the default value on creation for the "season" field.
	DefaultSeason int8
	// DefaultCreatedTs holds the default value on creation for the "created_ts" field.
	DefaultCreatedTs func() time.Time
)

Columns holds all SQL columns for match fields.

View Source
var ForeignKeys = []string{
	"osn_map_matches",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "matches" table and are not defined as standalone fields in the schema.

View Source
var (
	// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
	// primary key for the roles relation (M2M).
	RolesPrimaryKey = []string{"role_match", "id"}
)

Functions

func And

func And(predicates ...predicate.Match) predicate.Match

And groups predicates with the AND operator between them.

func CreatedTs

func CreatedTs(v time.Time) predicate.Match

CreatedTs applies equality check predicate on the "created_ts" field. It's identical to CreatedTsEQ.

func CreatedTsEQ

func CreatedTsEQ(v time.Time) predicate.Match

CreatedTsEQ applies the EQ predicate on the "created_ts" field.

func CreatedTsGT

func CreatedTsGT(v time.Time) predicate.Match

CreatedTsGT applies the GT predicate on the "created_ts" field.

func CreatedTsGTE

func CreatedTsGTE(v time.Time) predicate.Match

CreatedTsGTE applies the GTE predicate on the "created_ts" field.

func CreatedTsIn

func CreatedTsIn(vs ...time.Time) predicate.Match

CreatedTsIn applies the In predicate on the "created_ts" field.

func CreatedTsLT

func CreatedTsLT(v time.Time) predicate.Match

CreatedTsLT applies the LT predicate on the "created_ts" field.

func CreatedTsLTE

func CreatedTsLTE(v time.Time) predicate.Match

CreatedTsLTE applies the LTE predicate on the "created_ts" field.

func CreatedTsNEQ

func CreatedTsNEQ(v time.Time) predicate.Match

CreatedTsNEQ applies the NEQ predicate on the "created_ts" field.

func CreatedTsNotIn

func CreatedTsNotIn(vs ...time.Time) predicate.Match

CreatedTsNotIn applies the NotIn predicate on the "created_ts" field.

func FetchStatusEQ

func FetchStatusEQ(v FetchStatus) predicate.Match

FetchStatusEQ applies the EQ predicate on the "fetch_status" field.

func FetchStatusIn

func FetchStatusIn(vs ...FetchStatus) predicate.Match

FetchStatusIn applies the In predicate on the "fetch_status" field.

func FetchStatusNEQ

func FetchStatusNEQ(v FetchStatus) predicate.Match

FetchStatusNEQ applies the NEQ predicate on the "fetch_status" field.

func FetchStatusNotIn

func FetchStatusNotIn(vs ...FetchStatus) predicate.Match

FetchStatusNotIn applies the NotIn predicate on the "fetch_status" field.

func FetchStatusValidator

func FetchStatusValidator(fs FetchStatus) error

FetchStatusValidator is a validator for the "fetch_status" field enum values. It is called by the builders before save.

func HasMap

func HasMap() predicate.Match

HasMap applies the HasEdge predicate on the "map" edge.

func HasMapWith

func HasMapWith(preds ...predicate.OsnMap) predicate.Match

HasMapWith applies the HasEdge predicate on the "map" edge with a given conditions (other predicates).

func HasRoles

func HasRoles() predicate.Match

HasRoles applies the HasEdge predicate on the "roles" edge.

func HasRolesWith

func HasRolesWith(preds ...predicate.PlayerRole) predicate.Match

HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Match

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Match

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Match

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Match

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Match

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Match

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Match

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Match

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Match

IDNotIn applies the NotIn predicate on the ID field.

func MatchHash

func MatchHash(v string) predicate.Match

MatchHash applies equality check predicate on the "match_hash" field. It's identical to MatchHashEQ.

func MatchHashContains

func MatchHashContains(v string) predicate.Match

MatchHashContains applies the Contains predicate on the "match_hash" field.

func MatchHashContainsFold

func MatchHashContainsFold(v string) predicate.Match

MatchHashContainsFold applies the ContainsFold predicate on the "match_hash" field.

func MatchHashEQ

func MatchHashEQ(v string) predicate.Match

MatchHashEQ applies the EQ predicate on the "match_hash" field.

func MatchHashEqualFold

func MatchHashEqualFold(v string) predicate.Match

MatchHashEqualFold applies the EqualFold predicate on the "match_hash" field.

func MatchHashGT

func MatchHashGT(v string) predicate.Match

MatchHashGT applies the GT predicate on the "match_hash" field.

func MatchHashGTE

func MatchHashGTE(v string) predicate.Match

MatchHashGTE applies the GTE predicate on the "match_hash" field.

func MatchHashHasPrefix

func MatchHashHasPrefix(v string) predicate.Match

MatchHashHasPrefix applies the HasPrefix predicate on the "match_hash" field.

func MatchHashHasSuffix

func MatchHashHasSuffix(v string) predicate.Match

MatchHashHasSuffix applies the HasSuffix predicate on the "match_hash" field.

func MatchHashIn

func MatchHashIn(vs ...string) predicate.Match

MatchHashIn applies the In predicate on the "match_hash" field.

func MatchHashLT

func MatchHashLT(v string) predicate.Match

MatchHashLT applies the LT predicate on the "match_hash" field.

func MatchHashLTE

func MatchHashLTE(v string) predicate.Match

MatchHashLTE applies the LTE predicate on the "match_hash" field.

func MatchHashNEQ

func MatchHashNEQ(v string) predicate.Match

MatchHashNEQ applies the NEQ predicate on the "match_hash" field.

func MatchHashNotIn

func MatchHashNotIn(vs ...string) predicate.Match

MatchHashNotIn applies the NotIn predicate on the "match_hash" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Match) predicate.Match

Or groups predicates with the OR operator between them.

func Season

func Season(v int8) predicate.Match

Season applies equality check predicate on the "season" field. It's identical to SeasonEQ.

func SeasonEQ

func SeasonEQ(v int8) predicate.Match

SeasonEQ applies the EQ predicate on the "season" field.

func SeasonGT

func SeasonGT(v int8) predicate.Match

SeasonGT applies the GT predicate on the "season" field.

func SeasonGTE

func SeasonGTE(v int8) predicate.Match

SeasonGTE applies the GTE predicate on the "season" field.

func SeasonIn

func SeasonIn(vs ...int8) predicate.Match

SeasonIn applies the In predicate on the "season" field.

func SeasonLT

func SeasonLT(v int8) predicate.Match

SeasonLT applies the LT predicate on the "season" field.

func SeasonLTE

func SeasonLTE(v int8) predicate.Match

SeasonLTE applies the LTE predicate on the "season" field.

func SeasonNEQ

func SeasonNEQ(v int8) predicate.Match

SeasonNEQ applies the NEQ predicate on the "season" field.

func SeasonNotIn

func SeasonNotIn(vs ...int8) predicate.Match

SeasonNotIn applies the NotIn predicate on the "season" field.

func TurnCount

func TurnCount(v int) predicate.Match

TurnCount applies equality check predicate on the "turn_count" field. It's identical to TurnCountEQ.

func TurnCountEQ

func TurnCountEQ(v int) predicate.Match

TurnCountEQ applies the EQ predicate on the "turn_count" field.

func TurnCountGT

func TurnCountGT(v int) predicate.Match

TurnCountGT applies the GT predicate on the "turn_count" field.

func TurnCountGTE

func TurnCountGTE(v int) predicate.Match

TurnCountGTE applies the GTE predicate on the "turn_count" field.

func TurnCountIn

func TurnCountIn(vs ...int) predicate.Match

TurnCountIn applies the In predicate on the "turn_count" field.

func TurnCountLT

func TurnCountLT(v int) predicate.Match

TurnCountLT applies the LT predicate on the "turn_count" field.

func TurnCountLTE

func TurnCountLTE(v int) predicate.Match

TurnCountLTE applies the LTE predicate on the "turn_count" field.

func TurnCountNEQ

func TurnCountNEQ(v int) predicate.Match

TurnCountNEQ applies the NEQ predicate on the "turn_count" field.

func TurnCountNotIn

func TurnCountNotIn(vs ...int) predicate.Match

TurnCountNotIn applies the NotIn predicate on the "turn_count" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Version

func Version(v int) predicate.Match

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionEQ

func VersionEQ(v int) predicate.Match

VersionEQ applies the EQ predicate on the "version" field.

func VersionGT

func VersionGT(v int) predicate.Match

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v int) predicate.Match

VersionGTE applies the GTE predicate on the "version" field.

func VersionIn

func VersionIn(vs ...int) predicate.Match

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v int) predicate.Match

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v int) predicate.Match

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v int) predicate.Match

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...int) predicate.Match

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type FetchStatus

type FetchStatus string

FetchStatus defines the type for the "fetch_status" enum field.

const (
	FetchStatusUNKNOWN   FetchStatus = "UNKNOWN"
	FetchStatusLISTED    FetchStatus = "LISTED"
	FetchStatusFETCHED   FetchStatus = "FETCHED"
	FetchStatusUNWRAPPED FetchStatus = "UNWRAPPED"
	FetchStatusCONVERTED FetchStatus = "CONVERTED"
	FetchStatusCANONICAL FetchStatus = "CANONICAL"
	FetchStatusVALIDATED FetchStatus = "VALIDATED"
	FetchStatusINDEXED   FetchStatus = "INDEXED"
	FetchStatusINVALID   FetchStatus = "INVALID"
	FetchStatusLEGACY    FetchStatus = "LEGACY"
)

FetchStatus values.

func (FetchStatus) String

func (fs FetchStatus) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Match queries.

func ByCreatedTs

func ByCreatedTs(opts ...sql.OrderTermOption) OrderOption

ByCreatedTs orders the results by the created_ts field.

func ByFetchStatus

func ByFetchStatus(opts ...sql.OrderTermOption) OrderOption

ByFetchStatus orders the results by the fetch_status field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByMapField

func ByMapField(field string, opts ...sql.OrderTermOption) OrderOption

ByMapField orders the results by map field.

func ByMatchHash

func ByMatchHash(opts ...sql.OrderTermOption) OrderOption

ByMatchHash orders the results by the match_hash field.

func ByRoles

func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRoles orders the results by roles terms.

func ByRolesCount

func ByRolesCount(opts ...sql.OrderTermOption) OrderOption

ByRolesCount orders the results by roles count.

func BySeason

func BySeason(opts ...sql.OrderTermOption) OrderOption

BySeason orders the results by the season field.

func ByTurnCount

func ByTurnCount(opts ...sql.OrderTermOption) OrderOption

ByTurnCount orders the results by the turn_count field.

func ByVersion

func ByVersion(opts ...sql.OrderTermOption) OrderOption

ByVersion orders the results by the version field.

Jump to

Keyboard shortcuts

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