ent

package
v0.0.0-...-4b256dd Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeMatch       = "Match"
	TypeMatchPlayer = "MatchPlayer"
	TypeMessages    = "Messages"
	TypePlayer      = "Player"
	TypeRoundStats  = "RoundStats"
	TypeSpray       = "Spray"
	TypeWeapon      = "Weapon"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Match is the client for interacting with the Match builders.
	Match *MatchClient
	// MatchPlayer is the client for interacting with the MatchPlayer builders.
	MatchPlayer *MatchPlayerClient
	// Messages is the client for interacting with the Messages builders.
	Messages *MessagesClient
	// Player is the client for interacting with the Player builders.
	Player *PlayerClient
	// RoundStats is the client for interacting with the RoundStats builders.
	RoundStats *RoundStatsClient
	// Spray is the client for interacting with the Spray builders.
	Spray *SprayClient
	// Weapon is the client for interacting with the Weapon builders.
	Weapon *WeaponClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Match.
	Query().
	Count(ctx)

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Match

type Match struct {

	// ID of the ent.
	ID uint64 `json:"match_id,string"`
	// ShareCode holds the value of the "share_code" field.
	ShareCode string `json:"share_code,omitempty"`
	// Map holds the value of the "map" field.
	Map string `json:"map,omitempty"`
	// Date holds the value of the "date" field.
	Date time.Time `json:"date,omitempty"`
	// ScoreTeamA holds the value of the "score_team_a" field.
	ScoreTeamA int `json:"score_team_a,omitempty"`
	// ScoreTeamB holds the value of the "score_team_b" field.
	ScoreTeamB int `json:"score_team_b,omitempty"`
	// ReplayURL holds the value of the "replay_url" field.
	ReplayURL string `json:"-"`
	// Duration holds the value of the "duration" field.
	Duration int `json:"duration,omitempty"`
	// MatchResult holds the value of the "match_result" field.
	MatchResult int `json:"match_result,omitempty"`
	// MaxRounds holds the value of the "max_rounds" field.
	MaxRounds int `json:"max_rounds,omitempty"`
	// DemoParsed holds the value of the "demo_parsed" field.
	DemoParsed bool `json:"demo_parsed,omitempty"`
	// VacPresent holds the value of the "vac_present" field.
	VacPresent bool `json:"vac_present,omitempty"`
	// GamebanPresent holds the value of the "gameban_present" field.
	GamebanPresent bool `json:"gameban_present,omitempty"`
	// DecryptionKey holds the value of the "decryption_key" field.
	DecryptionKey []byte `json:"decryption_key,omitempty"`
	// TickRate holds the value of the "tick_rate" field.
	TickRate float64 `json:"tick_rate,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MatchQuery when eager-loading is set.
	Edges MatchEdges `json:"edges"`
	// contains filtered or unexported fields
}

Match is the model entity for the Match schema.

func (*Match) QueryPlayers

func (m *Match) QueryPlayers() *PlayerQuery

QueryPlayers queries the "players" edge of the Match entity.

func (*Match) QueryStats

func (m *Match) QueryStats() *MatchPlayerQuery

QueryStats queries the "stats" edge of the Match entity.

func (*Match) String

func (m *Match) String() string

String implements the fmt.Stringer.

func (*Match) Unwrap

func (m *Match) Unwrap() *Match

Unwrap unwraps the Match entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Match) Update

func (m *Match) Update() *MatchUpdateOne

Update returns a builder for updating this Match. Note that you need to call Match.Unwrap() before calling this method if this Match was returned from a transaction, and the transaction was committed or rolled back.

type MatchClient

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

MatchClient is a client for the Match schema.

func NewMatchClient

func NewMatchClient(c config) *MatchClient

NewMatchClient returns a client for the Match from the given config.

func (*MatchClient) Create

func (c *MatchClient) Create() *MatchCreate

Create returns a builder for creating a Match entity.

func (*MatchClient) CreateBulk

func (c *MatchClient) CreateBulk(builders ...*MatchCreate) *MatchCreateBulk

CreateBulk returns a builder for creating a bulk of Match entities.

func (*MatchClient) Delete

func (c *MatchClient) Delete() *MatchDelete

Delete returns a delete builder for Match.

func (*MatchClient) DeleteOne

func (c *MatchClient) DeleteOne(m *Match) *MatchDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MatchClient) DeleteOneID

func (c *MatchClient) DeleteOneID(id uint64) *MatchDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*MatchClient) Get

func (c *MatchClient) Get(ctx context.Context, id uint64) (*Match, error)

Get returns a Match entity by its id.

func (*MatchClient) GetX

func (c *MatchClient) GetX(ctx context.Context, id uint64) *Match

GetX is like Get, but panics if an error occurs.

func (*MatchClient) Hooks

func (c *MatchClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MatchClient) Query

func (c *MatchClient) Query() *MatchQuery

Query returns a query builder for Match.

func (*MatchClient) QueryPlayers

func (c *MatchClient) QueryPlayers(m *Match) *PlayerQuery

QueryPlayers queries the players edge of a Match.

func (*MatchClient) QueryStats

func (c *MatchClient) QueryStats(m *Match) *MatchPlayerQuery

QueryStats queries the stats edge of a Match.

func (*MatchClient) Update

func (c *MatchClient) Update() *MatchUpdate

Update returns an update builder for Match.

func (*MatchClient) UpdateOne

func (c *MatchClient) UpdateOne(m *Match) *MatchUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MatchClient) UpdateOneID

func (c *MatchClient) UpdateOneID(id uint64) *MatchUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MatchClient) Use

func (c *MatchClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `match.Hooks(f(g(h())))`.

type MatchCreate

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

MatchCreate is the builder for creating a Match entity.

func (*MatchCreate) AddPlayerIDs

func (mc *MatchCreate) AddPlayerIDs(ids ...uint64) *MatchCreate

AddPlayerIDs adds the "players" edge to the Player entity by IDs.

func (*MatchCreate) AddPlayers

func (mc *MatchCreate) AddPlayers(p ...*Player) *MatchCreate

AddPlayers adds the "players" edges to the Player entity.

func (*MatchCreate) AddStatIDs

func (mc *MatchCreate) AddStatIDs(ids ...int) *MatchCreate

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*MatchCreate) AddStats

func (mc *MatchCreate) AddStats(m ...*MatchPlayer) *MatchCreate

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*MatchCreate) Exec

func (mc *MatchCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchCreate) ExecX

func (mc *MatchCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchCreate) Mutation

func (mc *MatchCreate) Mutation() *MatchMutation

Mutation returns the MatchMutation object of the builder.

func (*MatchCreate) Save

func (mc *MatchCreate) Save(ctx context.Context) (*Match, error)

Save creates the Match in the database.

func (*MatchCreate) SaveX

func (mc *MatchCreate) SaveX(ctx context.Context) *Match

SaveX calls Save and panics if Save returns an error.

func (*MatchCreate) SetDate

func (mc *MatchCreate) SetDate(t time.Time) *MatchCreate

SetDate sets the "date" field.

func (*MatchCreate) SetDecryptionKey

func (mc *MatchCreate) SetDecryptionKey(b []byte) *MatchCreate

SetDecryptionKey sets the "decryption_key" field.

func (*MatchCreate) SetDemoParsed

func (mc *MatchCreate) SetDemoParsed(b bool) *MatchCreate

SetDemoParsed sets the "demo_parsed" field.

func (*MatchCreate) SetDuration

func (mc *MatchCreate) SetDuration(i int) *MatchCreate

SetDuration sets the "duration" field.

func (*MatchCreate) SetGamebanPresent

func (mc *MatchCreate) SetGamebanPresent(b bool) *MatchCreate

SetGamebanPresent sets the "gameban_present" field.

func (*MatchCreate) SetID

func (mc *MatchCreate) SetID(u uint64) *MatchCreate

SetID sets the "id" field.

func (*MatchCreate) SetMap

func (mc *MatchCreate) SetMap(s string) *MatchCreate

SetMap sets the "map" field.

func (*MatchCreate) SetMatchResult

func (mc *MatchCreate) SetMatchResult(i int) *MatchCreate

SetMatchResult sets the "match_result" field.

func (*MatchCreate) SetMaxRounds

func (mc *MatchCreate) SetMaxRounds(i int) *MatchCreate

SetMaxRounds sets the "max_rounds" field.

func (*MatchCreate) SetNillableDemoParsed

func (mc *MatchCreate) SetNillableDemoParsed(b *bool) *MatchCreate

SetNillableDemoParsed sets the "demo_parsed" field if the given value is not nil.

func (*MatchCreate) SetNillableGamebanPresent

func (mc *MatchCreate) SetNillableGamebanPresent(b *bool) *MatchCreate

SetNillableGamebanPresent sets the "gameban_present" field if the given value is not nil.

func (*MatchCreate) SetNillableMap

func (mc *MatchCreate) SetNillableMap(s *string) *MatchCreate

SetNillableMap sets the "map" field if the given value is not nil.

func (*MatchCreate) SetNillableReplayURL

func (mc *MatchCreate) SetNillableReplayURL(s *string) *MatchCreate

SetNillableReplayURL sets the "replay_url" field if the given value is not nil.

func (*MatchCreate) SetNillableTickRate

func (mc *MatchCreate) SetNillableTickRate(f *float64) *MatchCreate

SetNillableTickRate sets the "tick_rate" field if the given value is not nil.

func (*MatchCreate) SetNillableVacPresent

func (mc *MatchCreate) SetNillableVacPresent(b *bool) *MatchCreate

SetNillableVacPresent sets the "vac_present" field if the given value is not nil.

func (*MatchCreate) SetReplayURL

func (mc *MatchCreate) SetReplayURL(s string) *MatchCreate

SetReplayURL sets the "replay_url" field.

func (*MatchCreate) SetScoreTeamA

func (mc *MatchCreate) SetScoreTeamA(i int) *MatchCreate

SetScoreTeamA sets the "score_team_a" field.

func (*MatchCreate) SetScoreTeamB

func (mc *MatchCreate) SetScoreTeamB(i int) *MatchCreate

SetScoreTeamB sets the "score_team_b" field.

func (*MatchCreate) SetShareCode

func (mc *MatchCreate) SetShareCode(s string) *MatchCreate

SetShareCode sets the "share_code" field.

func (*MatchCreate) SetTickRate

func (mc *MatchCreate) SetTickRate(f float64) *MatchCreate

SetTickRate sets the "tick_rate" field.

func (*MatchCreate) SetVacPresent

func (mc *MatchCreate) SetVacPresent(b bool) *MatchCreate

SetVacPresent sets the "vac_present" field.

type MatchCreateBulk

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

MatchCreateBulk is the builder for creating many Match entities in bulk.

func (*MatchCreateBulk) Exec

func (mcb *MatchCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchCreateBulk) ExecX

func (mcb *MatchCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchCreateBulk) Save

func (mcb *MatchCreateBulk) Save(ctx context.Context) ([]*Match, error)

Save creates the Match entities in the database.

func (*MatchCreateBulk) SaveX

func (mcb *MatchCreateBulk) SaveX(ctx context.Context) []*Match

SaveX is like Save, but panics if an error occurs.

type MatchDelete

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

MatchDelete is the builder for deleting a Match entity.

func (*MatchDelete) Exec

func (md *MatchDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MatchDelete) ExecX

func (md *MatchDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MatchDelete) Where

func (md *MatchDelete) Where(ps ...predicate.Match) *MatchDelete

Where appends a list predicates to the MatchDelete builder.

type MatchDeleteOne

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

MatchDeleteOne is the builder for deleting a single Match entity.

func (*MatchDeleteOne) Exec

func (mdo *MatchDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MatchDeleteOne) ExecX

func (mdo *MatchDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MatchEdges

type MatchEdges struct {
	// Stats holds the value of the stats edge.
	Stats []*MatchPlayer `json:"stats,omitempty"`
	// Players holds the value of the players edge.
	Players []*Player `json:"players,omitempty"`
	// contains filtered or unexported fields
}

MatchEdges holds the relations/edges for other nodes in the graph.

func (MatchEdges) PlayersOrErr

func (e MatchEdges) PlayersOrErr() ([]*Player, error)

PlayersOrErr returns the Players value or an error if the edge was not loaded in eager-loading.

func (MatchEdges) StatsOrErr

func (e MatchEdges) StatsOrErr() ([]*MatchPlayer, error)

StatsOrErr returns the Stats value or an error if the edge was not loaded in eager-loading.

type MatchGroupBy

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

MatchGroupBy is the group-by builder for Match entities.

func (*MatchGroupBy) Aggregate

func (mgb *MatchGroupBy) Aggregate(fns ...AggregateFunc) *MatchGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MatchGroupBy) Bool

func (s *MatchGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) BoolX

func (s *MatchGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MatchGroupBy) Bools

func (s *MatchGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) BoolsX

func (s *MatchGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MatchGroupBy) Float64

func (s *MatchGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) Float64X

func (s *MatchGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MatchGroupBy) Float64s

func (s *MatchGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) Float64sX

func (s *MatchGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MatchGroupBy) Int

func (s *MatchGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) IntX

func (s *MatchGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MatchGroupBy) Ints

func (s *MatchGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) IntsX

func (s *MatchGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MatchGroupBy) Scan

func (mgb *MatchGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*MatchGroupBy) ScanX

func (s *MatchGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MatchGroupBy) String

func (s *MatchGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) StringX

func (s *MatchGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MatchGroupBy) Strings

func (s *MatchGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MatchGroupBy) StringsX

func (s *MatchGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MatchMutation

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

MatchMutation represents an operation that mutates the Match nodes in the graph.

func (*MatchMutation) AddDuration

func (m *MatchMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*MatchMutation) AddField

func (m *MatchMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MatchMutation) AddMatchResult

func (m *MatchMutation) AddMatchResult(i int)

AddMatchResult adds i to the "match_result" field.

func (*MatchMutation) AddMaxRounds

func (m *MatchMutation) AddMaxRounds(i int)

AddMaxRounds adds i to the "max_rounds" field.

func (*MatchMutation) AddPlayerIDs

func (m *MatchMutation) AddPlayerIDs(ids ...uint64)

AddPlayerIDs adds the "players" edge to the Player entity by ids.

func (*MatchMutation) AddScoreTeamA

func (m *MatchMutation) AddScoreTeamA(i int)

AddScoreTeamA adds i to the "score_team_a" field.

func (*MatchMutation) AddScoreTeamB

func (m *MatchMutation) AddScoreTeamB(i int)

AddScoreTeamB adds i to the "score_team_b" field.

func (*MatchMutation) AddStatIDs

func (m *MatchMutation) AddStatIDs(ids ...int)

AddStatIDs adds the "stats" edge to the MatchPlayer entity by ids.

func (*MatchMutation) AddTickRate

func (m *MatchMutation) AddTickRate(f float64)

AddTickRate adds f to the "tick_rate" field.

func (*MatchMutation) AddedDuration

func (m *MatchMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*MatchMutation) AddedEdges

func (m *MatchMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MatchMutation) AddedField

func (m *MatchMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MatchMutation) AddedFields

func (m *MatchMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MatchMutation) AddedIDs

func (m *MatchMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MatchMutation) AddedMatchResult

func (m *MatchMutation) AddedMatchResult() (r int, exists bool)

AddedMatchResult returns the value that was added to the "match_result" field in this mutation.

func (*MatchMutation) AddedMaxRounds

func (m *MatchMutation) AddedMaxRounds() (r int, exists bool)

AddedMaxRounds returns the value that was added to the "max_rounds" field in this mutation.

func (*MatchMutation) AddedScoreTeamA

func (m *MatchMutation) AddedScoreTeamA() (r int, exists bool)

AddedScoreTeamA returns the value that was added to the "score_team_a" field in this mutation.

func (*MatchMutation) AddedScoreTeamB

func (m *MatchMutation) AddedScoreTeamB() (r int, exists bool)

AddedScoreTeamB returns the value that was added to the "score_team_b" field in this mutation.

func (*MatchMutation) AddedTickRate

func (m *MatchMutation) AddedTickRate() (r float64, exists bool)

AddedTickRate returns the value that was added to the "tick_rate" field in this mutation.

func (*MatchMutation) ClearDecryptionKey

func (m *MatchMutation) ClearDecryptionKey()

ClearDecryptionKey clears the value of the "decryption_key" field.

func (*MatchMutation) ClearEdge

func (m *MatchMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*MatchMutation) ClearField

func (m *MatchMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*MatchMutation) ClearMap

func (m *MatchMutation) ClearMap()

ClearMap clears the value of the "map" field.

func (*MatchMutation) ClearPlayers

func (m *MatchMutation) ClearPlayers()

ClearPlayers clears the "players" edge to the Player entity.

func (*MatchMutation) ClearReplayURL

func (m *MatchMutation) ClearReplayURL()

ClearReplayURL clears the value of the "replay_url" field.

func (*MatchMutation) ClearStats

func (m *MatchMutation) ClearStats()

ClearStats clears the "stats" edge to the MatchPlayer entity.

func (*MatchMutation) ClearTickRate

func (m *MatchMutation) ClearTickRate()

ClearTickRate clears the value of the "tick_rate" field.

func (*MatchMutation) ClearedEdges

func (m *MatchMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MatchMutation) ClearedFields

func (m *MatchMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MatchMutation) Client

func (m MatchMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*MatchMutation) Date

func (m *MatchMutation) Date() (r time.Time, exists bool)

Date returns the value of the "date" field in the mutation.

func (*MatchMutation) DecryptionKey

func (m *MatchMutation) DecryptionKey() (r []byte, exists bool)

DecryptionKey returns the value of the "decryption_key" field in the mutation.

func (*MatchMutation) DecryptionKeyCleared

func (m *MatchMutation) DecryptionKeyCleared() bool

DecryptionKeyCleared returns if the "decryption_key" field was cleared in this mutation.

func (*MatchMutation) DemoParsed

func (m *MatchMutation) DemoParsed() (r bool, exists bool)

DemoParsed returns the value of the "demo_parsed" field in the mutation.

func (*MatchMutation) Duration

func (m *MatchMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*MatchMutation) EdgeCleared

func (m *MatchMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MatchMutation) Field

func (m *MatchMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MatchMutation) FieldCleared

func (m *MatchMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MatchMutation) Fields

func (m *MatchMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*MatchMutation) GamebanPresent

func (m *MatchMutation) GamebanPresent() (r bool, exists bool)

GamebanPresent returns the value of the "gameban_present" field in the mutation.

func (*MatchMutation) ID

func (m *MatchMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MatchMutation) IDs

func (m *MatchMutation) IDs(ctx context.Context) ([]uint64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MatchMutation) Map

func (m *MatchMutation) Map() (r string, exists bool)

Map returns the value of the "map" field in the mutation.

func (*MatchMutation) MapCleared

func (m *MatchMutation) MapCleared() bool

MapCleared returns if the "map" field was cleared in this mutation.

func (*MatchMutation) MatchResult

func (m *MatchMutation) MatchResult() (r int, exists bool)

MatchResult returns the value of the "match_result" field in the mutation.

func (*MatchMutation) MaxRounds

func (m *MatchMutation) MaxRounds() (r int, exists bool)

MaxRounds returns the value of the "max_rounds" field in the mutation.

func (*MatchMutation) OldDate

func (m *MatchMutation) OldDate(ctx context.Context) (v time.Time, err error)

OldDate returns the old "date" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldDecryptionKey

func (m *MatchMutation) OldDecryptionKey(ctx context.Context) (v []byte, err error)

OldDecryptionKey returns the old "decryption_key" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldDemoParsed

func (m *MatchMutation) OldDemoParsed(ctx context.Context) (v bool, err error)

OldDemoParsed returns the old "demo_parsed" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldDuration

func (m *MatchMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldField

func (m *MatchMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MatchMutation) OldGamebanPresent

func (m *MatchMutation) OldGamebanPresent(ctx context.Context) (v bool, err error)

OldGamebanPresent returns the old "gameban_present" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldMap

func (m *MatchMutation) OldMap(ctx context.Context) (v string, err error)

OldMap returns the old "map" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldMatchResult

func (m *MatchMutation) OldMatchResult(ctx context.Context) (v int, err error)

OldMatchResult returns the old "match_result" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldMaxRounds

func (m *MatchMutation) OldMaxRounds(ctx context.Context) (v int, err error)

OldMaxRounds returns the old "max_rounds" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldReplayURL

func (m *MatchMutation) OldReplayURL(ctx context.Context) (v string, err error)

OldReplayURL returns the old "replay_url" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldScoreTeamA

func (m *MatchMutation) OldScoreTeamA(ctx context.Context) (v int, err error)

OldScoreTeamA returns the old "score_team_a" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldScoreTeamB

func (m *MatchMutation) OldScoreTeamB(ctx context.Context) (v int, err error)

OldScoreTeamB returns the old "score_team_b" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldShareCode

func (m *MatchMutation) OldShareCode(ctx context.Context) (v string, err error)

OldShareCode returns the old "share_code" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldTickRate

func (m *MatchMutation) OldTickRate(ctx context.Context) (v float64, err error)

OldTickRate returns the old "tick_rate" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) OldVacPresent

func (m *MatchMutation) OldVacPresent(ctx context.Context) (v bool, err error)

OldVacPresent returns the old "vac_present" field's value of the Match entity. If the Match object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchMutation) Op

func (m *MatchMutation) Op() Op

Op returns the operation name.

func (*MatchMutation) PlayersCleared

func (m *MatchMutation) PlayersCleared() bool

PlayersCleared reports if the "players" edge to the Player entity was cleared.

func (*MatchMutation) PlayersIDs

func (m *MatchMutation) PlayersIDs() (ids []uint64)

PlayersIDs returns the "players" edge IDs in the mutation.

func (*MatchMutation) RemovePlayerIDs

func (m *MatchMutation) RemovePlayerIDs(ids ...uint64)

RemovePlayerIDs removes the "players" edge to the Player entity by IDs.

func (*MatchMutation) RemoveStatIDs

func (m *MatchMutation) RemoveStatIDs(ids ...int)

RemoveStatIDs removes the "stats" edge to the MatchPlayer entity by IDs.

func (*MatchMutation) RemovedEdges

func (m *MatchMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MatchMutation) RemovedIDs

func (m *MatchMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MatchMutation) RemovedPlayersIDs

func (m *MatchMutation) RemovedPlayersIDs() (ids []uint64)

RemovedPlayers returns the removed IDs of the "players" edge to the Player entity.

func (*MatchMutation) RemovedStatsIDs

func (m *MatchMutation) RemovedStatsIDs() (ids []int)

RemovedStats returns the removed IDs of the "stats" edge to the MatchPlayer entity.

func (*MatchMutation) ReplayURL

func (m *MatchMutation) ReplayURL() (r string, exists bool)

ReplayURL returns the value of the "replay_url" field in the mutation.

func (*MatchMutation) ReplayURLCleared

func (m *MatchMutation) ReplayURLCleared() bool

ReplayURLCleared returns if the "replay_url" field was cleared in this mutation.

func (*MatchMutation) ResetDate

func (m *MatchMutation) ResetDate()

ResetDate resets all changes to the "date" field.

func (*MatchMutation) ResetDecryptionKey

func (m *MatchMutation) ResetDecryptionKey()

ResetDecryptionKey resets all changes to the "decryption_key" field.

func (*MatchMutation) ResetDemoParsed

func (m *MatchMutation) ResetDemoParsed()

ResetDemoParsed resets all changes to the "demo_parsed" field.

func (*MatchMutation) ResetDuration

func (m *MatchMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*MatchMutation) ResetEdge

func (m *MatchMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*MatchMutation) ResetField

func (m *MatchMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*MatchMutation) ResetGamebanPresent

func (m *MatchMutation) ResetGamebanPresent()

ResetGamebanPresent resets all changes to the "gameban_present" field.

func (*MatchMutation) ResetMap

func (m *MatchMutation) ResetMap()

ResetMap resets all changes to the "map" field.

func (*MatchMutation) ResetMatchResult

func (m *MatchMutation) ResetMatchResult()

ResetMatchResult resets all changes to the "match_result" field.

func (*MatchMutation) ResetMaxRounds

func (m *MatchMutation) ResetMaxRounds()

ResetMaxRounds resets all changes to the "max_rounds" field.

func (*MatchMutation) ResetPlayers

func (m *MatchMutation) ResetPlayers()

ResetPlayers resets all changes to the "players" edge.

func (*MatchMutation) ResetReplayURL

func (m *MatchMutation) ResetReplayURL()

ResetReplayURL resets all changes to the "replay_url" field.

func (*MatchMutation) ResetScoreTeamA

func (m *MatchMutation) ResetScoreTeamA()

ResetScoreTeamA resets all changes to the "score_team_a" field.

func (*MatchMutation) ResetScoreTeamB

func (m *MatchMutation) ResetScoreTeamB()

ResetScoreTeamB resets all changes to the "score_team_b" field.

func (*MatchMutation) ResetShareCode

func (m *MatchMutation) ResetShareCode()

ResetShareCode resets all changes to the "share_code" field.

func (*MatchMutation) ResetStats

func (m *MatchMutation) ResetStats()

ResetStats resets all changes to the "stats" edge.

func (*MatchMutation) ResetTickRate

func (m *MatchMutation) ResetTickRate()

ResetTickRate resets all changes to the "tick_rate" field.

func (*MatchMutation) ResetVacPresent

func (m *MatchMutation) ResetVacPresent()

ResetVacPresent resets all changes to the "vac_present" field.

func (*MatchMutation) ScoreTeamA

func (m *MatchMutation) ScoreTeamA() (r int, exists bool)

ScoreTeamA returns the value of the "score_team_a" field in the mutation.

func (*MatchMutation) ScoreTeamB

func (m *MatchMutation) ScoreTeamB() (r int, exists bool)

ScoreTeamB returns the value of the "score_team_b" field in the mutation.

func (*MatchMutation) SetDate

func (m *MatchMutation) SetDate(t time.Time)

SetDate sets the "date" field.

func (*MatchMutation) SetDecryptionKey

func (m *MatchMutation) SetDecryptionKey(b []byte)

SetDecryptionKey sets the "decryption_key" field.

func (*MatchMutation) SetDemoParsed

func (m *MatchMutation) SetDemoParsed(b bool)

SetDemoParsed sets the "demo_parsed" field.

func (*MatchMutation) SetDuration

func (m *MatchMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*MatchMutation) SetField

func (m *MatchMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MatchMutation) SetGamebanPresent

func (m *MatchMutation) SetGamebanPresent(b bool)

SetGamebanPresent sets the "gameban_present" field.

func (*MatchMutation) SetID

func (m *MatchMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Match entities.

func (*MatchMutation) SetMap

func (m *MatchMutation) SetMap(s string)

SetMap sets the "map" field.

func (*MatchMutation) SetMatchResult

func (m *MatchMutation) SetMatchResult(i int)

SetMatchResult sets the "match_result" field.

func (*MatchMutation) SetMaxRounds

func (m *MatchMutation) SetMaxRounds(i int)

SetMaxRounds sets the "max_rounds" field.

func (*MatchMutation) SetReplayURL

func (m *MatchMutation) SetReplayURL(s string)

SetReplayURL sets the "replay_url" field.

func (*MatchMutation) SetScoreTeamA

func (m *MatchMutation) SetScoreTeamA(i int)

SetScoreTeamA sets the "score_team_a" field.

func (*MatchMutation) SetScoreTeamB

func (m *MatchMutation) SetScoreTeamB(i int)

SetScoreTeamB sets the "score_team_b" field.

func (*MatchMutation) SetShareCode

func (m *MatchMutation) SetShareCode(s string)

SetShareCode sets the "share_code" field.

func (*MatchMutation) SetTickRate

func (m *MatchMutation) SetTickRate(f float64)

SetTickRate sets the "tick_rate" field.

func (*MatchMutation) SetVacPresent

func (m *MatchMutation) SetVacPresent(b bool)

SetVacPresent sets the "vac_present" field.

func (*MatchMutation) ShareCode

func (m *MatchMutation) ShareCode() (r string, exists bool)

ShareCode returns the value of the "share_code" field in the mutation.

func (*MatchMutation) StatsCleared

func (m *MatchMutation) StatsCleared() bool

StatsCleared reports if the "stats" edge to the MatchPlayer entity was cleared.

func (*MatchMutation) StatsIDs

func (m *MatchMutation) StatsIDs() (ids []int)

StatsIDs returns the "stats" edge IDs in the mutation.

func (*MatchMutation) TickRate

func (m *MatchMutation) TickRate() (r float64, exists bool)

TickRate returns the value of the "tick_rate" field in the mutation.

func (*MatchMutation) TickRateCleared

func (m *MatchMutation) TickRateCleared() bool

TickRateCleared returns if the "tick_rate" field was cleared in this mutation.

func (MatchMutation) Tx

func (m MatchMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MatchMutation) Type

func (m *MatchMutation) Type() string

Type returns the node type of this mutation (Match).

func (*MatchMutation) VacPresent

func (m *MatchMutation) VacPresent() (r bool, exists bool)

VacPresent returns the value of the "vac_present" field in the mutation.

func (*MatchMutation) Where

func (m *MatchMutation) Where(ps ...predicate.Match)

Where appends a list predicates to the MatchMutation builder.

type MatchPlayer

type MatchPlayer struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TeamID holds the value of the "team_id" field.
	TeamID int `json:"team_id,omitempty"`
	// Kills holds the value of the "kills" field.
	Kills int `json:"kills,omitempty"`
	// Deaths holds the value of the "deaths" field.
	Deaths int `json:"deaths,omitempty"`
	// Assists holds the value of the "assists" field.
	Assists int `json:"assists,omitempty"`
	// Headshot holds the value of the "headshot" field.
	Headshot int `json:"headshot,omitempty"`
	// Mvp holds the value of the "mvp" field.
	Mvp uint `json:"mvp,omitempty"`
	// Score holds the value of the "score" field.
	Score int `json:"score,omitempty"`
	// RankNew holds the value of the "rank_new" field.
	RankNew int `json:"rank_new,omitempty"`
	// RankOld holds the value of the "rank_old" field.
	RankOld int `json:"rank_old,omitempty"`
	// Mk2 holds the value of the "mk_2" field.
	Mk2 uint `json:"mk_2,omitempty"`
	// Mk3 holds the value of the "mk_3" field.
	Mk3 uint `json:"mk_3,omitempty"`
	// Mk4 holds the value of the "mk_4" field.
	Mk4 uint `json:"mk_4,omitempty"`
	// Mk5 holds the value of the "mk_5" field.
	Mk5 uint `json:"mk_5,omitempty"`
	// DmgEnemy holds the value of the "dmg_enemy" field.
	DmgEnemy uint `json:"dmg_enemy,omitempty"`
	// DmgTeam holds the value of the "dmg_team" field.
	DmgTeam uint `json:"dmg_team,omitempty"`
	// UdHe holds the value of the "ud_he" field.
	UdHe uint `json:"ud_he,omitempty"`
	// UdFlames holds the value of the "ud_flames" field.
	UdFlames uint `json:"ud_flames,omitempty"`
	// UdFlash holds the value of the "ud_flash" field.
	UdFlash uint `json:"ud_flash,omitempty"`
	// UdDecoy holds the value of the "ud_decoy" field.
	UdDecoy uint `json:"ud_decoy,omitempty"`
	// UdSmoke holds the value of the "ud_smoke" field.
	UdSmoke uint `json:"ud_smoke,omitempty"`
	// Crosshair holds the value of the "crosshair" field.
	Crosshair string `json:"crosshair,omitempty"`
	// Color holds the value of the "color" field.
	Color matchplayer.Color `json:"color,omitempty"`
	// Kast holds the value of the "kast" field.
	Kast int `json:"kast,omitempty"`
	// FlashDurationSelf holds the value of the "flash_duration_self" field.
	FlashDurationSelf float32 `json:"flash_duration_self,omitempty"`
	// FlashDurationTeam holds the value of the "flash_duration_team" field.
	FlashDurationTeam float32 `json:"flash_duration_team,omitempty"`
	// FlashDurationEnemy holds the value of the "flash_duration_enemy" field.
	FlashDurationEnemy float32 `json:"flash_duration_enemy,omitempty"`
	// FlashTotalSelf holds the value of the "flash_total_self" field.
	FlashTotalSelf uint `json:"flash_total_self,omitempty"`
	// FlashTotalTeam holds the value of the "flash_total_team" field.
	FlashTotalTeam uint `json:"flash_total_team,omitempty"`
	// FlashTotalEnemy holds the value of the "flash_total_enemy" field.
	FlashTotalEnemy uint `json:"flash_total_enemy,omitempty"`
	// MatchStats holds the value of the "match_stats" field.
	MatchStats uint64 `json:"match_stats,omitempty"`
	// PlayerStats holds the value of the "player_stats" field.
	PlayerStats uint64 `json:"player_stats,omitempty"`
	// FlashAssists holds the value of the "flash_assists" field.
	FlashAssists int `json:"flash_assists,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MatchPlayerQuery when eager-loading is set.
	Edges MatchPlayerEdges `json:"edges"`
	// contains filtered or unexported fields
}

MatchPlayer is the model entity for the MatchPlayer schema.

func (*MatchPlayer) QueryMatches

func (mp *MatchPlayer) QueryMatches() *MatchQuery

QueryMatches queries the "matches" edge of the MatchPlayer entity.

func (*MatchPlayer) QueryMessages

func (mp *MatchPlayer) QueryMessages() *MessagesQuery

QueryMessages queries the "messages" edge of the MatchPlayer entity.

func (*MatchPlayer) QueryPlayers

func (mp *MatchPlayer) QueryPlayers() *PlayerQuery

QueryPlayers queries the "players" edge of the MatchPlayer entity.

func (*MatchPlayer) QueryRoundStats

func (mp *MatchPlayer) QueryRoundStats() *RoundStatsQuery

QueryRoundStats queries the "round_stats" edge of the MatchPlayer entity.

func (*MatchPlayer) QuerySpray

func (mp *MatchPlayer) QuerySpray() *SprayQuery

QuerySpray queries the "spray" edge of the MatchPlayer entity.

func (*MatchPlayer) QueryWeaponStats

func (mp *MatchPlayer) QueryWeaponStats() *WeaponQuery

QueryWeaponStats queries the "weapon_stats" edge of the MatchPlayer entity.

func (*MatchPlayer) String

func (mp *MatchPlayer) String() string

String implements the fmt.Stringer.

func (*MatchPlayer) Unwrap

func (mp *MatchPlayer) Unwrap() *MatchPlayer

Unwrap unwraps the MatchPlayer entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*MatchPlayer) Update

func (mp *MatchPlayer) Update() *MatchPlayerUpdateOne

Update returns a builder for updating this MatchPlayer. Note that you need to call MatchPlayer.Unwrap() before calling this method if this MatchPlayer was returned from a transaction, and the transaction was committed or rolled back.

type MatchPlayerClient

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

MatchPlayerClient is a client for the MatchPlayer schema.

func NewMatchPlayerClient

func NewMatchPlayerClient(c config) *MatchPlayerClient

NewMatchPlayerClient returns a client for the MatchPlayer from the given config.

func (*MatchPlayerClient) Create

func (c *MatchPlayerClient) Create() *MatchPlayerCreate

Create returns a builder for creating a MatchPlayer entity.

func (*MatchPlayerClient) CreateBulk

func (c *MatchPlayerClient) CreateBulk(builders ...*MatchPlayerCreate) *MatchPlayerCreateBulk

CreateBulk returns a builder for creating a bulk of MatchPlayer entities.

func (*MatchPlayerClient) Delete

func (c *MatchPlayerClient) Delete() *MatchPlayerDelete

Delete returns a delete builder for MatchPlayer.

func (*MatchPlayerClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MatchPlayerClient) DeleteOneID

func (c *MatchPlayerClient) DeleteOneID(id int) *MatchPlayerDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*MatchPlayerClient) Get

func (c *MatchPlayerClient) Get(ctx context.Context, id int) (*MatchPlayer, error)

Get returns a MatchPlayer entity by its id.

func (*MatchPlayerClient) GetX

func (c *MatchPlayerClient) GetX(ctx context.Context, id int) *MatchPlayer

GetX is like Get, but panics if an error occurs.

func (*MatchPlayerClient) Hooks

func (c *MatchPlayerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MatchPlayerClient) Query

func (c *MatchPlayerClient) Query() *MatchPlayerQuery

Query returns a query builder for MatchPlayer.

func (*MatchPlayerClient) QueryMatches

func (c *MatchPlayerClient) QueryMatches(mp *MatchPlayer) *MatchQuery

QueryMatches queries the matches edge of a MatchPlayer.

func (*MatchPlayerClient) QueryMessages

func (c *MatchPlayerClient) QueryMessages(mp *MatchPlayer) *MessagesQuery

QueryMessages queries the messages edge of a MatchPlayer.

func (*MatchPlayerClient) QueryPlayers

func (c *MatchPlayerClient) QueryPlayers(mp *MatchPlayer) *PlayerQuery

QueryPlayers queries the players edge of a MatchPlayer.

func (*MatchPlayerClient) QueryRoundStats

func (c *MatchPlayerClient) QueryRoundStats(mp *MatchPlayer) *RoundStatsQuery

QueryRoundStats queries the round_stats edge of a MatchPlayer.

func (*MatchPlayerClient) QuerySpray

func (c *MatchPlayerClient) QuerySpray(mp *MatchPlayer) *SprayQuery

QuerySpray queries the spray edge of a MatchPlayer.

func (*MatchPlayerClient) QueryWeaponStats

func (c *MatchPlayerClient) QueryWeaponStats(mp *MatchPlayer) *WeaponQuery

QueryWeaponStats queries the weapon_stats edge of a MatchPlayer.

func (*MatchPlayerClient) Update

func (c *MatchPlayerClient) Update() *MatchPlayerUpdate

Update returns an update builder for MatchPlayer.

func (*MatchPlayerClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MatchPlayerClient) UpdateOneID

func (c *MatchPlayerClient) UpdateOneID(id int) *MatchPlayerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MatchPlayerClient) Use

func (c *MatchPlayerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `matchplayer.Hooks(f(g(h())))`.

type MatchPlayerCreate

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

MatchPlayerCreate is the builder for creating a MatchPlayer entity.

func (*MatchPlayerCreate) AddMessageIDs

func (mpc *MatchPlayerCreate) AddMessageIDs(ids ...int) *MatchPlayerCreate

AddMessageIDs adds the "messages" edge to the Messages entity by IDs.

func (*MatchPlayerCreate) AddMessages

func (mpc *MatchPlayerCreate) AddMessages(m ...*Messages) *MatchPlayerCreate

AddMessages adds the "messages" edges to the Messages entity.

func (*MatchPlayerCreate) AddRoundStatIDs

func (mpc *MatchPlayerCreate) AddRoundStatIDs(ids ...int) *MatchPlayerCreate

AddRoundStatIDs adds the "round_stats" edge to the RoundStats entity by IDs.

func (*MatchPlayerCreate) AddRoundStats

func (mpc *MatchPlayerCreate) AddRoundStats(r ...*RoundStats) *MatchPlayerCreate

AddRoundStats adds the "round_stats" edges to the RoundStats entity.

func (*MatchPlayerCreate) AddSpray

func (mpc *MatchPlayerCreate) AddSpray(s ...*Spray) *MatchPlayerCreate

AddSpray adds the "spray" edges to the Spray entity.

func (*MatchPlayerCreate) AddSprayIDs

func (mpc *MatchPlayerCreate) AddSprayIDs(ids ...int) *MatchPlayerCreate

AddSprayIDs adds the "spray" edge to the Spray entity by IDs.

func (*MatchPlayerCreate) AddWeaponStatIDs

func (mpc *MatchPlayerCreate) AddWeaponStatIDs(ids ...int) *MatchPlayerCreate

AddWeaponStatIDs adds the "weapon_stats" edge to the Weapon entity by IDs.

func (*MatchPlayerCreate) AddWeaponStats

func (mpc *MatchPlayerCreate) AddWeaponStats(w ...*Weapon) *MatchPlayerCreate

AddWeaponStats adds the "weapon_stats" edges to the Weapon entity.

func (*MatchPlayerCreate) Exec

func (mpc *MatchPlayerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchPlayerCreate) ExecX

func (mpc *MatchPlayerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchPlayerCreate) Mutation

func (mpc *MatchPlayerCreate) Mutation() *MatchPlayerMutation

Mutation returns the MatchPlayerMutation object of the builder.

func (*MatchPlayerCreate) Save

func (mpc *MatchPlayerCreate) Save(ctx context.Context) (*MatchPlayer, error)

Save creates the MatchPlayer in the database.

func (*MatchPlayerCreate) SaveX

func (mpc *MatchPlayerCreate) SaveX(ctx context.Context) *MatchPlayer

SaveX calls Save and panics if Save returns an error.

func (*MatchPlayerCreate) SetAssists

func (mpc *MatchPlayerCreate) SetAssists(i int) *MatchPlayerCreate

SetAssists sets the "assists" field.

func (*MatchPlayerCreate) SetColor

SetColor sets the "color" field.

func (*MatchPlayerCreate) SetCrosshair

func (mpc *MatchPlayerCreate) SetCrosshair(s string) *MatchPlayerCreate

SetCrosshair sets the "crosshair" field.

func (*MatchPlayerCreate) SetDeaths

func (mpc *MatchPlayerCreate) SetDeaths(i int) *MatchPlayerCreate

SetDeaths sets the "deaths" field.

func (*MatchPlayerCreate) SetDmgEnemy

func (mpc *MatchPlayerCreate) SetDmgEnemy(u uint) *MatchPlayerCreate

SetDmgEnemy sets the "dmg_enemy" field.

func (*MatchPlayerCreate) SetDmgTeam

func (mpc *MatchPlayerCreate) SetDmgTeam(u uint) *MatchPlayerCreate

SetDmgTeam sets the "dmg_team" field.

func (*MatchPlayerCreate) SetFlashAssists

func (mpc *MatchPlayerCreate) SetFlashAssists(i int) *MatchPlayerCreate

SetFlashAssists sets the "flash_assists" field.

func (*MatchPlayerCreate) SetFlashDurationEnemy

func (mpc *MatchPlayerCreate) SetFlashDurationEnemy(f float32) *MatchPlayerCreate

SetFlashDurationEnemy sets the "flash_duration_enemy" field.

func (*MatchPlayerCreate) SetFlashDurationSelf

func (mpc *MatchPlayerCreate) SetFlashDurationSelf(f float32) *MatchPlayerCreate

SetFlashDurationSelf sets the "flash_duration_self" field.

func (*MatchPlayerCreate) SetFlashDurationTeam

func (mpc *MatchPlayerCreate) SetFlashDurationTeam(f float32) *MatchPlayerCreate

SetFlashDurationTeam sets the "flash_duration_team" field.

func (*MatchPlayerCreate) SetFlashTotalEnemy

func (mpc *MatchPlayerCreate) SetFlashTotalEnemy(u uint) *MatchPlayerCreate

SetFlashTotalEnemy sets the "flash_total_enemy" field.

func (*MatchPlayerCreate) SetFlashTotalSelf

func (mpc *MatchPlayerCreate) SetFlashTotalSelf(u uint) *MatchPlayerCreate

SetFlashTotalSelf sets the "flash_total_self" field.

func (*MatchPlayerCreate) SetFlashTotalTeam

func (mpc *MatchPlayerCreate) SetFlashTotalTeam(u uint) *MatchPlayerCreate

SetFlashTotalTeam sets the "flash_total_team" field.

func (*MatchPlayerCreate) SetHeadshot

func (mpc *MatchPlayerCreate) SetHeadshot(i int) *MatchPlayerCreate

SetHeadshot sets the "headshot" field.

func (*MatchPlayerCreate) SetKast

func (mpc *MatchPlayerCreate) SetKast(i int) *MatchPlayerCreate

SetKast sets the "kast" field.

func (*MatchPlayerCreate) SetKills

func (mpc *MatchPlayerCreate) SetKills(i int) *MatchPlayerCreate

SetKills sets the "kills" field.

func (*MatchPlayerCreate) SetMatchStats

func (mpc *MatchPlayerCreate) SetMatchStats(u uint64) *MatchPlayerCreate

SetMatchStats sets the "match_stats" field.

func (*MatchPlayerCreate) SetMatches

func (mpc *MatchPlayerCreate) SetMatches(m *Match) *MatchPlayerCreate

SetMatches sets the "matches" edge to the Match entity.

func (*MatchPlayerCreate) SetMatchesID

func (mpc *MatchPlayerCreate) SetMatchesID(id uint64) *MatchPlayerCreate

SetMatchesID sets the "matches" edge to the Match entity by ID.

func (*MatchPlayerCreate) SetMk2

func (mpc *MatchPlayerCreate) SetMk2(u uint) *MatchPlayerCreate

SetMk2 sets the "mk_2" field.

func (*MatchPlayerCreate) SetMk3

func (mpc *MatchPlayerCreate) SetMk3(u uint) *MatchPlayerCreate

SetMk3 sets the "mk_3" field.

func (*MatchPlayerCreate) SetMk4

func (mpc *MatchPlayerCreate) SetMk4(u uint) *MatchPlayerCreate

SetMk4 sets the "mk_4" field.

func (*MatchPlayerCreate) SetMk5

func (mpc *MatchPlayerCreate) SetMk5(u uint) *MatchPlayerCreate

SetMk5 sets the "mk_5" field.

func (*MatchPlayerCreate) SetMvp

func (mpc *MatchPlayerCreate) SetMvp(u uint) *MatchPlayerCreate

SetMvp sets the "mvp" field.

func (*MatchPlayerCreate) SetNillableColor

func (mpc *MatchPlayerCreate) SetNillableColor(m *matchplayer.Color) *MatchPlayerCreate

SetNillableColor sets the "color" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableCrosshair

func (mpc *MatchPlayerCreate) SetNillableCrosshair(s *string) *MatchPlayerCreate

SetNillableCrosshair sets the "crosshair" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableDmgEnemy

func (mpc *MatchPlayerCreate) SetNillableDmgEnemy(u *uint) *MatchPlayerCreate

SetNillableDmgEnemy sets the "dmg_enemy" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableDmgTeam

func (mpc *MatchPlayerCreate) SetNillableDmgTeam(u *uint) *MatchPlayerCreate

SetNillableDmgTeam sets the "dmg_team" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashAssists

func (mpc *MatchPlayerCreate) SetNillableFlashAssists(i *int) *MatchPlayerCreate

SetNillableFlashAssists sets the "flash_assists" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashDurationEnemy

func (mpc *MatchPlayerCreate) SetNillableFlashDurationEnemy(f *float32) *MatchPlayerCreate

SetNillableFlashDurationEnemy sets the "flash_duration_enemy" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashDurationSelf

func (mpc *MatchPlayerCreate) SetNillableFlashDurationSelf(f *float32) *MatchPlayerCreate

SetNillableFlashDurationSelf sets the "flash_duration_self" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashDurationTeam

func (mpc *MatchPlayerCreate) SetNillableFlashDurationTeam(f *float32) *MatchPlayerCreate

SetNillableFlashDurationTeam sets the "flash_duration_team" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashTotalEnemy

func (mpc *MatchPlayerCreate) SetNillableFlashTotalEnemy(u *uint) *MatchPlayerCreate

SetNillableFlashTotalEnemy sets the "flash_total_enemy" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashTotalSelf

func (mpc *MatchPlayerCreate) SetNillableFlashTotalSelf(u *uint) *MatchPlayerCreate

SetNillableFlashTotalSelf sets the "flash_total_self" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableFlashTotalTeam

func (mpc *MatchPlayerCreate) SetNillableFlashTotalTeam(u *uint) *MatchPlayerCreate

SetNillableFlashTotalTeam sets the "flash_total_team" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableKast

func (mpc *MatchPlayerCreate) SetNillableKast(i *int) *MatchPlayerCreate

SetNillableKast sets the "kast" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMatchStats

func (mpc *MatchPlayerCreate) SetNillableMatchStats(u *uint64) *MatchPlayerCreate

SetNillableMatchStats sets the "match_stats" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMatchesID

func (mpc *MatchPlayerCreate) SetNillableMatchesID(id *uint64) *MatchPlayerCreate

SetNillableMatchesID sets the "matches" edge to the Match entity by ID if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMk2

func (mpc *MatchPlayerCreate) SetNillableMk2(u *uint) *MatchPlayerCreate

SetNillableMk2 sets the "mk_2" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMk3

func (mpc *MatchPlayerCreate) SetNillableMk3(u *uint) *MatchPlayerCreate

SetNillableMk3 sets the "mk_3" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMk4

func (mpc *MatchPlayerCreate) SetNillableMk4(u *uint) *MatchPlayerCreate

SetNillableMk4 sets the "mk_4" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableMk5

func (mpc *MatchPlayerCreate) SetNillableMk5(u *uint) *MatchPlayerCreate

SetNillableMk5 sets the "mk_5" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillablePlayerStats

func (mpc *MatchPlayerCreate) SetNillablePlayerStats(u *uint64) *MatchPlayerCreate

SetNillablePlayerStats sets the "player_stats" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillablePlayersID

func (mpc *MatchPlayerCreate) SetNillablePlayersID(id *uint64) *MatchPlayerCreate

SetNillablePlayersID sets the "players" edge to the Player entity by ID if the given value is not nil.

func (*MatchPlayerCreate) SetNillableRankNew

func (mpc *MatchPlayerCreate) SetNillableRankNew(i *int) *MatchPlayerCreate

SetNillableRankNew sets the "rank_new" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableRankOld

func (mpc *MatchPlayerCreate) SetNillableRankOld(i *int) *MatchPlayerCreate

SetNillableRankOld sets the "rank_old" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableUdDecoy

func (mpc *MatchPlayerCreate) SetNillableUdDecoy(u *uint) *MatchPlayerCreate

SetNillableUdDecoy sets the "ud_decoy" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableUdFlames

func (mpc *MatchPlayerCreate) SetNillableUdFlames(u *uint) *MatchPlayerCreate

SetNillableUdFlames sets the "ud_flames" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableUdFlash

func (mpc *MatchPlayerCreate) SetNillableUdFlash(u *uint) *MatchPlayerCreate

SetNillableUdFlash sets the "ud_flash" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableUdHe

func (mpc *MatchPlayerCreate) SetNillableUdHe(u *uint) *MatchPlayerCreate

SetNillableUdHe sets the "ud_he" field if the given value is not nil.

func (*MatchPlayerCreate) SetNillableUdSmoke

func (mpc *MatchPlayerCreate) SetNillableUdSmoke(u *uint) *MatchPlayerCreate

SetNillableUdSmoke sets the "ud_smoke" field if the given value is not nil.

func (*MatchPlayerCreate) SetPlayerStats

func (mpc *MatchPlayerCreate) SetPlayerStats(u uint64) *MatchPlayerCreate

SetPlayerStats sets the "player_stats" field.

func (*MatchPlayerCreate) SetPlayers

func (mpc *MatchPlayerCreate) SetPlayers(p *Player) *MatchPlayerCreate

SetPlayers sets the "players" edge to the Player entity.

func (*MatchPlayerCreate) SetPlayersID

func (mpc *MatchPlayerCreate) SetPlayersID(id uint64) *MatchPlayerCreate

SetPlayersID sets the "players" edge to the Player entity by ID.

func (*MatchPlayerCreate) SetRankNew

func (mpc *MatchPlayerCreate) SetRankNew(i int) *MatchPlayerCreate

SetRankNew sets the "rank_new" field.

func (*MatchPlayerCreate) SetRankOld

func (mpc *MatchPlayerCreate) SetRankOld(i int) *MatchPlayerCreate

SetRankOld sets the "rank_old" field.

func (*MatchPlayerCreate) SetScore

func (mpc *MatchPlayerCreate) SetScore(i int) *MatchPlayerCreate

SetScore sets the "score" field.

func (*MatchPlayerCreate) SetTeamID

func (mpc *MatchPlayerCreate) SetTeamID(i int) *MatchPlayerCreate

SetTeamID sets the "team_id" field.

func (*MatchPlayerCreate) SetUdDecoy

func (mpc *MatchPlayerCreate) SetUdDecoy(u uint) *MatchPlayerCreate

SetUdDecoy sets the "ud_decoy" field.

func (*MatchPlayerCreate) SetUdFlames

func (mpc *MatchPlayerCreate) SetUdFlames(u uint) *MatchPlayerCreate

SetUdFlames sets the "ud_flames" field.

func (*MatchPlayerCreate) SetUdFlash

func (mpc *MatchPlayerCreate) SetUdFlash(u uint) *MatchPlayerCreate

SetUdFlash sets the "ud_flash" field.

func (*MatchPlayerCreate) SetUdHe

func (mpc *MatchPlayerCreate) SetUdHe(u uint) *MatchPlayerCreate

SetUdHe sets the "ud_he" field.

func (*MatchPlayerCreate) SetUdSmoke

func (mpc *MatchPlayerCreate) SetUdSmoke(u uint) *MatchPlayerCreate

SetUdSmoke sets the "ud_smoke" field.

type MatchPlayerCreateBulk

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

MatchPlayerCreateBulk is the builder for creating many MatchPlayer entities in bulk.

func (*MatchPlayerCreateBulk) Exec

func (mpcb *MatchPlayerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchPlayerCreateBulk) ExecX

func (mpcb *MatchPlayerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchPlayerCreateBulk) Save

func (mpcb *MatchPlayerCreateBulk) Save(ctx context.Context) ([]*MatchPlayer, error)

Save creates the MatchPlayer entities in the database.

func (*MatchPlayerCreateBulk) SaveX

func (mpcb *MatchPlayerCreateBulk) SaveX(ctx context.Context) []*MatchPlayer

SaveX is like Save, but panics if an error occurs.

type MatchPlayerDelete

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

MatchPlayerDelete is the builder for deleting a MatchPlayer entity.

func (*MatchPlayerDelete) Exec

func (mpd *MatchPlayerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MatchPlayerDelete) ExecX

func (mpd *MatchPlayerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MatchPlayerDelete) Where

Where appends a list predicates to the MatchPlayerDelete builder.

type MatchPlayerDeleteOne

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

MatchPlayerDeleteOne is the builder for deleting a single MatchPlayer entity.

func (*MatchPlayerDeleteOne) Exec

func (mpdo *MatchPlayerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MatchPlayerDeleteOne) ExecX

func (mpdo *MatchPlayerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MatchPlayerEdges

type MatchPlayerEdges struct {
	// Matches holds the value of the matches edge.
	Matches *Match `json:"matches,omitempty"`
	// Players holds the value of the players edge.
	Players *Player `json:"players,omitempty"`
	// WeaponStats holds the value of the weapon_stats edge.
	WeaponStats []*Weapon `json:"weapon_stats,omitempty"`
	// RoundStats holds the value of the round_stats edge.
	RoundStats []*RoundStats `json:"round_stats,omitempty"`
	// Spray holds the value of the spray edge.
	Spray []*Spray `json:"spray,omitempty"`
	// Messages holds the value of the messages edge.
	Messages []*Messages `json:"messages,omitempty"`
	// contains filtered or unexported fields
}

MatchPlayerEdges holds the relations/edges for other nodes in the graph.

func (MatchPlayerEdges) MatchesOrErr

func (e MatchPlayerEdges) MatchesOrErr() (*Match, error)

MatchesOrErr returns the Matches value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MatchPlayerEdges) MessagesOrErr

func (e MatchPlayerEdges) MessagesOrErr() ([]*Messages, error)

MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.

func (MatchPlayerEdges) PlayersOrErr

func (e MatchPlayerEdges) PlayersOrErr() (*Player, error)

PlayersOrErr returns the Players value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MatchPlayerEdges) RoundStatsOrErr

func (e MatchPlayerEdges) RoundStatsOrErr() ([]*RoundStats, error)

RoundStatsOrErr returns the RoundStats value or an error if the edge was not loaded in eager-loading.

func (MatchPlayerEdges) SprayOrErr

func (e MatchPlayerEdges) SprayOrErr() ([]*Spray, error)

SprayOrErr returns the Spray value or an error if the edge was not loaded in eager-loading.

func (MatchPlayerEdges) WeaponStatsOrErr

func (e MatchPlayerEdges) WeaponStatsOrErr() ([]*Weapon, error)

WeaponStatsOrErr returns the WeaponStats value or an error if the edge was not loaded in eager-loading.

type MatchPlayerGroupBy

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

MatchPlayerGroupBy is the group-by builder for MatchPlayer entities.

func (*MatchPlayerGroupBy) Aggregate

func (mpgb *MatchPlayerGroupBy) Aggregate(fns ...AggregateFunc) *MatchPlayerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MatchPlayerGroupBy) Bool

func (s *MatchPlayerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) BoolX

func (s *MatchPlayerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MatchPlayerGroupBy) Bools

func (s *MatchPlayerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) BoolsX

func (s *MatchPlayerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MatchPlayerGroupBy) Float64

func (s *MatchPlayerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) Float64X

func (s *MatchPlayerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MatchPlayerGroupBy) Float64s

func (s *MatchPlayerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) Float64sX

func (s *MatchPlayerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MatchPlayerGroupBy) Int

func (s *MatchPlayerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) IntX

func (s *MatchPlayerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MatchPlayerGroupBy) Ints

func (s *MatchPlayerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) IntsX

func (s *MatchPlayerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MatchPlayerGroupBy) Scan

func (mpgb *MatchPlayerGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*MatchPlayerGroupBy) ScanX

func (s *MatchPlayerGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MatchPlayerGroupBy) String

func (s *MatchPlayerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) StringX

func (s *MatchPlayerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MatchPlayerGroupBy) Strings

func (s *MatchPlayerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MatchPlayerGroupBy) StringsX

func (s *MatchPlayerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MatchPlayerMutation

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

MatchPlayerMutation represents an operation that mutates the MatchPlayer nodes in the graph.

func (*MatchPlayerMutation) AddAssists

func (m *MatchPlayerMutation) AddAssists(i int)

AddAssists adds i to the "assists" field.

func (*MatchPlayerMutation) AddDeaths

func (m *MatchPlayerMutation) AddDeaths(i int)

AddDeaths adds i to the "deaths" field.

func (*MatchPlayerMutation) AddDmgEnemy

func (m *MatchPlayerMutation) AddDmgEnemy(u int)

AddDmgEnemy adds u to the "dmg_enemy" field.

func (*MatchPlayerMutation) AddDmgTeam

func (m *MatchPlayerMutation) AddDmgTeam(u int)

AddDmgTeam adds u to the "dmg_team" field.

func (*MatchPlayerMutation) AddField

func (m *MatchPlayerMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MatchPlayerMutation) AddFlashAssists

func (m *MatchPlayerMutation) AddFlashAssists(i int)

AddFlashAssists adds i to the "flash_assists" field.

func (*MatchPlayerMutation) AddFlashDurationEnemy

func (m *MatchPlayerMutation) AddFlashDurationEnemy(f float32)

AddFlashDurationEnemy adds f to the "flash_duration_enemy" field.

func (*MatchPlayerMutation) AddFlashDurationSelf

func (m *MatchPlayerMutation) AddFlashDurationSelf(f float32)

AddFlashDurationSelf adds f to the "flash_duration_self" field.

func (*MatchPlayerMutation) AddFlashDurationTeam

func (m *MatchPlayerMutation) AddFlashDurationTeam(f float32)

AddFlashDurationTeam adds f to the "flash_duration_team" field.

func (*MatchPlayerMutation) AddFlashTotalEnemy

func (m *MatchPlayerMutation) AddFlashTotalEnemy(u int)

AddFlashTotalEnemy adds u to the "flash_total_enemy" field.

func (*MatchPlayerMutation) AddFlashTotalSelf

func (m *MatchPlayerMutation) AddFlashTotalSelf(u int)

AddFlashTotalSelf adds u to the "flash_total_self" field.

func (*MatchPlayerMutation) AddFlashTotalTeam

func (m *MatchPlayerMutation) AddFlashTotalTeam(u int)

AddFlashTotalTeam adds u to the "flash_total_team" field.

func (*MatchPlayerMutation) AddHeadshot

func (m *MatchPlayerMutation) AddHeadshot(i int)

AddHeadshot adds i to the "headshot" field.

func (*MatchPlayerMutation) AddKast

func (m *MatchPlayerMutation) AddKast(i int)

AddKast adds i to the "kast" field.

func (*MatchPlayerMutation) AddKills

func (m *MatchPlayerMutation) AddKills(i int)

AddKills adds i to the "kills" field.

func (*MatchPlayerMutation) AddMessageIDs

func (m *MatchPlayerMutation) AddMessageIDs(ids ...int)

AddMessageIDs adds the "messages" edge to the Messages entity by ids.

func (*MatchPlayerMutation) AddMk2

func (m *MatchPlayerMutation) AddMk2(u int)

AddMk2 adds u to the "mk_2" field.

func (*MatchPlayerMutation) AddMk3

func (m *MatchPlayerMutation) AddMk3(u int)

AddMk3 adds u to the "mk_3" field.

func (*MatchPlayerMutation) AddMk4

func (m *MatchPlayerMutation) AddMk4(u int)

AddMk4 adds u to the "mk_4" field.

func (*MatchPlayerMutation) AddMk5

func (m *MatchPlayerMutation) AddMk5(u int)

AddMk5 adds u to the "mk_5" field.

func (*MatchPlayerMutation) AddMvp

func (m *MatchPlayerMutation) AddMvp(u int)

AddMvp adds u to the "mvp" field.

func (*MatchPlayerMutation) AddRankNew

func (m *MatchPlayerMutation) AddRankNew(i int)

AddRankNew adds i to the "rank_new" field.

func (*MatchPlayerMutation) AddRankOld

func (m *MatchPlayerMutation) AddRankOld(i int)

AddRankOld adds i to the "rank_old" field.

func (*MatchPlayerMutation) AddRoundStatIDs

func (m *MatchPlayerMutation) AddRoundStatIDs(ids ...int)

AddRoundStatIDs adds the "round_stats" edge to the RoundStats entity by ids.

func (*MatchPlayerMutation) AddScore

func (m *MatchPlayerMutation) AddScore(i int)

AddScore adds i to the "score" field.

func (*MatchPlayerMutation) AddSprayIDs

func (m *MatchPlayerMutation) AddSprayIDs(ids ...int)

AddSprayIDs adds the "spray" edge to the Spray entity by ids.

func (*MatchPlayerMutation) AddTeamID

func (m *MatchPlayerMutation) AddTeamID(i int)

AddTeamID adds i to the "team_id" field.

func (*MatchPlayerMutation) AddUdDecoy

func (m *MatchPlayerMutation) AddUdDecoy(u int)

AddUdDecoy adds u to the "ud_decoy" field.

func (*MatchPlayerMutation) AddUdFlames

func (m *MatchPlayerMutation) AddUdFlames(u int)

AddUdFlames adds u to the "ud_flames" field.

func (*MatchPlayerMutation) AddUdFlash

func (m *MatchPlayerMutation) AddUdFlash(u int)

AddUdFlash adds u to the "ud_flash" field.

func (*MatchPlayerMutation) AddUdHe

func (m *MatchPlayerMutation) AddUdHe(u int)

AddUdHe adds u to the "ud_he" field.

func (*MatchPlayerMutation) AddUdSmoke

func (m *MatchPlayerMutation) AddUdSmoke(u int)

AddUdSmoke adds u to the "ud_smoke" field.

func (*MatchPlayerMutation) AddWeaponStatIDs

func (m *MatchPlayerMutation) AddWeaponStatIDs(ids ...int)

AddWeaponStatIDs adds the "weapon_stats" edge to the Weapon entity by ids.

func (*MatchPlayerMutation) AddedAssists

func (m *MatchPlayerMutation) AddedAssists() (r int, exists bool)

AddedAssists returns the value that was added to the "assists" field in this mutation.

func (*MatchPlayerMutation) AddedDeaths

func (m *MatchPlayerMutation) AddedDeaths() (r int, exists bool)

AddedDeaths returns the value that was added to the "deaths" field in this mutation.

func (*MatchPlayerMutation) AddedDmgEnemy

func (m *MatchPlayerMutation) AddedDmgEnemy() (r int, exists bool)

AddedDmgEnemy returns the value that was added to the "dmg_enemy" field in this mutation.

func (*MatchPlayerMutation) AddedDmgTeam

func (m *MatchPlayerMutation) AddedDmgTeam() (r int, exists bool)

AddedDmgTeam returns the value that was added to the "dmg_team" field in this mutation.

func (*MatchPlayerMutation) AddedEdges

func (m *MatchPlayerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MatchPlayerMutation) AddedField

func (m *MatchPlayerMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MatchPlayerMutation) AddedFields

func (m *MatchPlayerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MatchPlayerMutation) AddedFlashAssists

func (m *MatchPlayerMutation) AddedFlashAssists() (r int, exists bool)

AddedFlashAssists returns the value that was added to the "flash_assists" field in this mutation.

func (*MatchPlayerMutation) AddedFlashDurationEnemy

func (m *MatchPlayerMutation) AddedFlashDurationEnemy() (r float32, exists bool)

AddedFlashDurationEnemy returns the value that was added to the "flash_duration_enemy" field in this mutation.

func (*MatchPlayerMutation) AddedFlashDurationSelf

func (m *MatchPlayerMutation) AddedFlashDurationSelf() (r float32, exists bool)

AddedFlashDurationSelf returns the value that was added to the "flash_duration_self" field in this mutation.

func (*MatchPlayerMutation) AddedFlashDurationTeam

func (m *MatchPlayerMutation) AddedFlashDurationTeam() (r float32, exists bool)

AddedFlashDurationTeam returns the value that was added to the "flash_duration_team" field in this mutation.

func (*MatchPlayerMutation) AddedFlashTotalEnemy

func (m *MatchPlayerMutation) AddedFlashTotalEnemy() (r int, exists bool)

AddedFlashTotalEnemy returns the value that was added to the "flash_total_enemy" field in this mutation.

func (*MatchPlayerMutation) AddedFlashTotalSelf

func (m *MatchPlayerMutation) AddedFlashTotalSelf() (r int, exists bool)

AddedFlashTotalSelf returns the value that was added to the "flash_total_self" field in this mutation.

func (*MatchPlayerMutation) AddedFlashTotalTeam

func (m *MatchPlayerMutation) AddedFlashTotalTeam() (r int, exists bool)

AddedFlashTotalTeam returns the value that was added to the "flash_total_team" field in this mutation.

func (*MatchPlayerMutation) AddedHeadshot

func (m *MatchPlayerMutation) AddedHeadshot() (r int, exists bool)

AddedHeadshot returns the value that was added to the "headshot" field in this mutation.

func (*MatchPlayerMutation) AddedIDs

func (m *MatchPlayerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MatchPlayerMutation) AddedKast

func (m *MatchPlayerMutation) AddedKast() (r int, exists bool)

AddedKast returns the value that was added to the "kast" field in this mutation.

func (*MatchPlayerMutation) AddedKills

func (m *MatchPlayerMutation) AddedKills() (r int, exists bool)

AddedKills returns the value that was added to the "kills" field in this mutation.

func (*MatchPlayerMutation) AddedMk2

func (m *MatchPlayerMutation) AddedMk2() (r int, exists bool)

AddedMk2 returns the value that was added to the "mk_2" field in this mutation.

func (*MatchPlayerMutation) AddedMk3

func (m *MatchPlayerMutation) AddedMk3() (r int, exists bool)

AddedMk3 returns the value that was added to the "mk_3" field in this mutation.

func (*MatchPlayerMutation) AddedMk4

func (m *MatchPlayerMutation) AddedMk4() (r int, exists bool)

AddedMk4 returns the value that was added to the "mk_4" field in this mutation.

func (*MatchPlayerMutation) AddedMk5

func (m *MatchPlayerMutation) AddedMk5() (r int, exists bool)

AddedMk5 returns the value that was added to the "mk_5" field in this mutation.

func (*MatchPlayerMutation) AddedMvp

func (m *MatchPlayerMutation) AddedMvp() (r int, exists bool)

AddedMvp returns the value that was added to the "mvp" field in this mutation.

func (*MatchPlayerMutation) AddedRankNew

func (m *MatchPlayerMutation) AddedRankNew() (r int, exists bool)

AddedRankNew returns the value that was added to the "rank_new" field in this mutation.

func (*MatchPlayerMutation) AddedRankOld

func (m *MatchPlayerMutation) AddedRankOld() (r int, exists bool)

AddedRankOld returns the value that was added to the "rank_old" field in this mutation.

func (*MatchPlayerMutation) AddedScore

func (m *MatchPlayerMutation) AddedScore() (r int, exists bool)

AddedScore returns the value that was added to the "score" field in this mutation.

func (*MatchPlayerMutation) AddedTeamID

func (m *MatchPlayerMutation) AddedTeamID() (r int, exists bool)

AddedTeamID returns the value that was added to the "team_id" field in this mutation.

func (*MatchPlayerMutation) AddedUdDecoy

func (m *MatchPlayerMutation) AddedUdDecoy() (r int, exists bool)

AddedUdDecoy returns the value that was added to the "ud_decoy" field in this mutation.

func (*MatchPlayerMutation) AddedUdFlames

func (m *MatchPlayerMutation) AddedUdFlames() (r int, exists bool)

AddedUdFlames returns the value that was added to the "ud_flames" field in this mutation.

func (*MatchPlayerMutation) AddedUdFlash

func (m *MatchPlayerMutation) AddedUdFlash() (r int, exists bool)

AddedUdFlash returns the value that was added to the "ud_flash" field in this mutation.

func (*MatchPlayerMutation) AddedUdHe

func (m *MatchPlayerMutation) AddedUdHe() (r int, exists bool)

AddedUdHe returns the value that was added to the "ud_he" field in this mutation.

func (*MatchPlayerMutation) AddedUdSmoke

func (m *MatchPlayerMutation) AddedUdSmoke() (r int, exists bool)

AddedUdSmoke returns the value that was added to the "ud_smoke" field in this mutation.

func (*MatchPlayerMutation) Assists

func (m *MatchPlayerMutation) Assists() (r int, exists bool)

Assists returns the value of the "assists" field in the mutation.

func (*MatchPlayerMutation) ClearColor

func (m *MatchPlayerMutation) ClearColor()

ClearColor clears the value of the "color" field.

func (*MatchPlayerMutation) ClearCrosshair

func (m *MatchPlayerMutation) ClearCrosshair()

ClearCrosshair clears the value of the "crosshair" field.

func (*MatchPlayerMutation) ClearDmgEnemy

func (m *MatchPlayerMutation) ClearDmgEnemy()

ClearDmgEnemy clears the value of the "dmg_enemy" field.

func (*MatchPlayerMutation) ClearDmgTeam

func (m *MatchPlayerMutation) ClearDmgTeam()

ClearDmgTeam clears the value of the "dmg_team" field.

func (*MatchPlayerMutation) ClearEdge

func (m *MatchPlayerMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*MatchPlayerMutation) ClearField

func (m *MatchPlayerMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*MatchPlayerMutation) ClearFlashAssists

func (m *MatchPlayerMutation) ClearFlashAssists()

ClearFlashAssists clears the value of the "flash_assists" field.

func (*MatchPlayerMutation) ClearFlashDurationEnemy

func (m *MatchPlayerMutation) ClearFlashDurationEnemy()

ClearFlashDurationEnemy clears the value of the "flash_duration_enemy" field.

func (*MatchPlayerMutation) ClearFlashDurationSelf

func (m *MatchPlayerMutation) ClearFlashDurationSelf()

ClearFlashDurationSelf clears the value of the "flash_duration_self" field.

func (*MatchPlayerMutation) ClearFlashDurationTeam

func (m *MatchPlayerMutation) ClearFlashDurationTeam()

ClearFlashDurationTeam clears the value of the "flash_duration_team" field.

func (*MatchPlayerMutation) ClearFlashTotalEnemy

func (m *MatchPlayerMutation) ClearFlashTotalEnemy()

ClearFlashTotalEnemy clears the value of the "flash_total_enemy" field.

func (*MatchPlayerMutation) ClearFlashTotalSelf

func (m *MatchPlayerMutation) ClearFlashTotalSelf()

ClearFlashTotalSelf clears the value of the "flash_total_self" field.

func (*MatchPlayerMutation) ClearFlashTotalTeam

func (m *MatchPlayerMutation) ClearFlashTotalTeam()

ClearFlashTotalTeam clears the value of the "flash_total_team" field.

func (*MatchPlayerMutation) ClearKast

func (m *MatchPlayerMutation) ClearKast()

ClearKast clears the value of the "kast" field.

func (*MatchPlayerMutation) ClearMatchStats

func (m *MatchPlayerMutation) ClearMatchStats()

ClearMatchStats clears the value of the "match_stats" field.

func (*MatchPlayerMutation) ClearMatches

func (m *MatchPlayerMutation) ClearMatches()

ClearMatches clears the "matches" edge to the Match entity.

func (*MatchPlayerMutation) ClearMessages

func (m *MatchPlayerMutation) ClearMessages()

ClearMessages clears the "messages" edge to the Messages entity.

func (*MatchPlayerMutation) ClearMk2

func (m *MatchPlayerMutation) ClearMk2()

ClearMk2 clears the value of the "mk_2" field.

func (*MatchPlayerMutation) ClearMk3

func (m *MatchPlayerMutation) ClearMk3()

ClearMk3 clears the value of the "mk_3" field.

func (*MatchPlayerMutation) ClearMk4

func (m *MatchPlayerMutation) ClearMk4()

ClearMk4 clears the value of the "mk_4" field.

func (*MatchPlayerMutation) ClearMk5

func (m *MatchPlayerMutation) ClearMk5()

ClearMk5 clears the value of the "mk_5" field.

func (*MatchPlayerMutation) ClearPlayerStats

func (m *MatchPlayerMutation) ClearPlayerStats()

ClearPlayerStats clears the value of the "player_stats" field.

func (*MatchPlayerMutation) ClearPlayers

func (m *MatchPlayerMutation) ClearPlayers()

ClearPlayers clears the "players" edge to the Player entity.

func (*MatchPlayerMutation) ClearRankNew

func (m *MatchPlayerMutation) ClearRankNew()

ClearRankNew clears the value of the "rank_new" field.

func (*MatchPlayerMutation) ClearRankOld

func (m *MatchPlayerMutation) ClearRankOld()

ClearRankOld clears the value of the "rank_old" field.

func (*MatchPlayerMutation) ClearRoundStats

func (m *MatchPlayerMutation) ClearRoundStats()

ClearRoundStats clears the "round_stats" edge to the RoundStats entity.

func (*MatchPlayerMutation) ClearSpray

func (m *MatchPlayerMutation) ClearSpray()

ClearSpray clears the "spray" edge to the Spray entity.

func (*MatchPlayerMutation) ClearUdDecoy

func (m *MatchPlayerMutation) ClearUdDecoy()

ClearUdDecoy clears the value of the "ud_decoy" field.

func (*MatchPlayerMutation) ClearUdFlames

func (m *MatchPlayerMutation) ClearUdFlames()

ClearUdFlames clears the value of the "ud_flames" field.

func (*MatchPlayerMutation) ClearUdFlash

func (m *MatchPlayerMutation) ClearUdFlash()

ClearUdFlash clears the value of the "ud_flash" field.

func (*MatchPlayerMutation) ClearUdHe

func (m *MatchPlayerMutation) ClearUdHe()

ClearUdHe clears the value of the "ud_he" field.

func (*MatchPlayerMutation) ClearUdSmoke

func (m *MatchPlayerMutation) ClearUdSmoke()

ClearUdSmoke clears the value of the "ud_smoke" field.

func (*MatchPlayerMutation) ClearWeaponStats

func (m *MatchPlayerMutation) ClearWeaponStats()

ClearWeaponStats clears the "weapon_stats" edge to the Weapon entity.

func (*MatchPlayerMutation) ClearedEdges

func (m *MatchPlayerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MatchPlayerMutation) ClearedFields

func (m *MatchPlayerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MatchPlayerMutation) Client

func (m MatchPlayerMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*MatchPlayerMutation) Color

func (m *MatchPlayerMutation) Color() (r matchplayer.Color, exists bool)

Color returns the value of the "color" field in the mutation.

func (*MatchPlayerMutation) ColorCleared

func (m *MatchPlayerMutation) ColorCleared() bool

ColorCleared returns if the "color" field was cleared in this mutation.

func (*MatchPlayerMutation) Crosshair

func (m *MatchPlayerMutation) Crosshair() (r string, exists bool)

Crosshair returns the value of the "crosshair" field in the mutation.

func (*MatchPlayerMutation) CrosshairCleared

func (m *MatchPlayerMutation) CrosshairCleared() bool

CrosshairCleared returns if the "crosshair" field was cleared in this mutation.

func (*MatchPlayerMutation) Deaths

func (m *MatchPlayerMutation) Deaths() (r int, exists bool)

Deaths returns the value of the "deaths" field in the mutation.

func (*MatchPlayerMutation) DmgEnemy

func (m *MatchPlayerMutation) DmgEnemy() (r uint, exists bool)

DmgEnemy returns the value of the "dmg_enemy" field in the mutation.

func (*MatchPlayerMutation) DmgEnemyCleared

func (m *MatchPlayerMutation) DmgEnemyCleared() bool

DmgEnemyCleared returns if the "dmg_enemy" field was cleared in this mutation.

func (*MatchPlayerMutation) DmgTeam

func (m *MatchPlayerMutation) DmgTeam() (r uint, exists bool)

DmgTeam returns the value of the "dmg_team" field in the mutation.

func (*MatchPlayerMutation) DmgTeamCleared

func (m *MatchPlayerMutation) DmgTeamCleared() bool

DmgTeamCleared returns if the "dmg_team" field was cleared in this mutation.

func (*MatchPlayerMutation) EdgeCleared

func (m *MatchPlayerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MatchPlayerMutation) Field

func (m *MatchPlayerMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MatchPlayerMutation) FieldCleared

func (m *MatchPlayerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MatchPlayerMutation) Fields

func (m *MatchPlayerMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*MatchPlayerMutation) FlashAssists

func (m *MatchPlayerMutation) FlashAssists() (r int, exists bool)

FlashAssists returns the value of the "flash_assists" field in the mutation.

func (*MatchPlayerMutation) FlashAssistsCleared

func (m *MatchPlayerMutation) FlashAssistsCleared() bool

FlashAssistsCleared returns if the "flash_assists" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashDurationEnemy

func (m *MatchPlayerMutation) FlashDurationEnemy() (r float32, exists bool)

FlashDurationEnemy returns the value of the "flash_duration_enemy" field in the mutation.

func (*MatchPlayerMutation) FlashDurationEnemyCleared

func (m *MatchPlayerMutation) FlashDurationEnemyCleared() bool

FlashDurationEnemyCleared returns if the "flash_duration_enemy" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashDurationSelf

func (m *MatchPlayerMutation) FlashDurationSelf() (r float32, exists bool)

FlashDurationSelf returns the value of the "flash_duration_self" field in the mutation.

func (*MatchPlayerMutation) FlashDurationSelfCleared

func (m *MatchPlayerMutation) FlashDurationSelfCleared() bool

FlashDurationSelfCleared returns if the "flash_duration_self" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashDurationTeam

func (m *MatchPlayerMutation) FlashDurationTeam() (r float32, exists bool)

FlashDurationTeam returns the value of the "flash_duration_team" field in the mutation.

func (*MatchPlayerMutation) FlashDurationTeamCleared

func (m *MatchPlayerMutation) FlashDurationTeamCleared() bool

FlashDurationTeamCleared returns if the "flash_duration_team" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashTotalEnemy

func (m *MatchPlayerMutation) FlashTotalEnemy() (r uint, exists bool)

FlashTotalEnemy returns the value of the "flash_total_enemy" field in the mutation.

func (*MatchPlayerMutation) FlashTotalEnemyCleared

func (m *MatchPlayerMutation) FlashTotalEnemyCleared() bool

FlashTotalEnemyCleared returns if the "flash_total_enemy" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashTotalSelf

func (m *MatchPlayerMutation) FlashTotalSelf() (r uint, exists bool)

FlashTotalSelf returns the value of the "flash_total_self" field in the mutation.

func (*MatchPlayerMutation) FlashTotalSelfCleared

func (m *MatchPlayerMutation) FlashTotalSelfCleared() bool

FlashTotalSelfCleared returns if the "flash_total_self" field was cleared in this mutation.

func (*MatchPlayerMutation) FlashTotalTeam

func (m *MatchPlayerMutation) FlashTotalTeam() (r uint, exists bool)

FlashTotalTeam returns the value of the "flash_total_team" field in the mutation.

func (*MatchPlayerMutation) FlashTotalTeamCleared

func (m *MatchPlayerMutation) FlashTotalTeamCleared() bool

FlashTotalTeamCleared returns if the "flash_total_team" field was cleared in this mutation.

func (*MatchPlayerMutation) Headshot

func (m *MatchPlayerMutation) Headshot() (r int, exists bool)

Headshot returns the value of the "headshot" field in the mutation.

func (*MatchPlayerMutation) ID

func (m *MatchPlayerMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MatchPlayerMutation) IDs

func (m *MatchPlayerMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MatchPlayerMutation) Kast

func (m *MatchPlayerMutation) Kast() (r int, exists bool)

Kast returns the value of the "kast" field in the mutation.

func (*MatchPlayerMutation) KastCleared

func (m *MatchPlayerMutation) KastCleared() bool

KastCleared returns if the "kast" field was cleared in this mutation.

func (*MatchPlayerMutation) Kills

func (m *MatchPlayerMutation) Kills() (r int, exists bool)

Kills returns the value of the "kills" field in the mutation.

func (*MatchPlayerMutation) MatchStats

func (m *MatchPlayerMutation) MatchStats() (r uint64, exists bool)

MatchStats returns the value of the "match_stats" field in the mutation.

func (*MatchPlayerMutation) MatchStatsCleared

func (m *MatchPlayerMutation) MatchStatsCleared() bool

MatchStatsCleared returns if the "match_stats" field was cleared in this mutation.

func (*MatchPlayerMutation) MatchesCleared

func (m *MatchPlayerMutation) MatchesCleared() bool

MatchesCleared reports if the "matches" edge to the Match entity was cleared.

func (*MatchPlayerMutation) MatchesID

func (m *MatchPlayerMutation) MatchesID() (id uint64, exists bool)

MatchesID returns the "matches" edge ID in the mutation.

func (*MatchPlayerMutation) MatchesIDs

func (m *MatchPlayerMutation) MatchesIDs() (ids []uint64)

MatchesIDs returns the "matches" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MatchesID instead. It exists only for internal usage by the builders.

func (*MatchPlayerMutation) MessagesCleared

func (m *MatchPlayerMutation) MessagesCleared() bool

MessagesCleared reports if the "messages" edge to the Messages entity was cleared.

func (*MatchPlayerMutation) MessagesIDs

func (m *MatchPlayerMutation) MessagesIDs() (ids []int)

MessagesIDs returns the "messages" edge IDs in the mutation.

func (*MatchPlayerMutation) Mk2

func (m *MatchPlayerMutation) Mk2() (r uint, exists bool)

Mk2 returns the value of the "mk_2" field in the mutation.

func (*MatchPlayerMutation) Mk2Cleared

func (m *MatchPlayerMutation) Mk2Cleared() bool

Mk2Cleared returns if the "mk_2" field was cleared in this mutation.

func (*MatchPlayerMutation) Mk3

func (m *MatchPlayerMutation) Mk3() (r uint, exists bool)

Mk3 returns the value of the "mk_3" field in the mutation.

func (*MatchPlayerMutation) Mk3Cleared

func (m *MatchPlayerMutation) Mk3Cleared() bool

Mk3Cleared returns if the "mk_3" field was cleared in this mutation.

func (*MatchPlayerMutation) Mk4

func (m *MatchPlayerMutation) Mk4() (r uint, exists bool)

Mk4 returns the value of the "mk_4" field in the mutation.

func (*MatchPlayerMutation) Mk4Cleared

func (m *MatchPlayerMutation) Mk4Cleared() bool

Mk4Cleared returns if the "mk_4" field was cleared in this mutation.

func (*MatchPlayerMutation) Mk5

func (m *MatchPlayerMutation) Mk5() (r uint, exists bool)

Mk5 returns the value of the "mk_5" field in the mutation.

func (*MatchPlayerMutation) Mk5Cleared

func (m *MatchPlayerMutation) Mk5Cleared() bool

Mk5Cleared returns if the "mk_5" field was cleared in this mutation.

func (*MatchPlayerMutation) Mvp

func (m *MatchPlayerMutation) Mvp() (r uint, exists bool)

Mvp returns the value of the "mvp" field in the mutation.

func (*MatchPlayerMutation) OldAssists

func (m *MatchPlayerMutation) OldAssists(ctx context.Context) (v int, err error)

OldAssists returns the old "assists" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldColor

func (m *MatchPlayerMutation) OldColor(ctx context.Context) (v matchplayer.Color, err error)

OldColor returns the old "color" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldCrosshair

func (m *MatchPlayerMutation) OldCrosshair(ctx context.Context) (v string, err error)

OldCrosshair returns the old "crosshair" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldDeaths

func (m *MatchPlayerMutation) OldDeaths(ctx context.Context) (v int, err error)

OldDeaths returns the old "deaths" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldDmgEnemy

func (m *MatchPlayerMutation) OldDmgEnemy(ctx context.Context) (v uint, err error)

OldDmgEnemy returns the old "dmg_enemy" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldDmgTeam

func (m *MatchPlayerMutation) OldDmgTeam(ctx context.Context) (v uint, err error)

OldDmgTeam returns the old "dmg_team" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldField

func (m *MatchPlayerMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MatchPlayerMutation) OldFlashAssists

func (m *MatchPlayerMutation) OldFlashAssists(ctx context.Context) (v int, err error)

OldFlashAssists returns the old "flash_assists" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashDurationEnemy

func (m *MatchPlayerMutation) OldFlashDurationEnemy(ctx context.Context) (v float32, err error)

OldFlashDurationEnemy returns the old "flash_duration_enemy" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashDurationSelf

func (m *MatchPlayerMutation) OldFlashDurationSelf(ctx context.Context) (v float32, err error)

OldFlashDurationSelf returns the old "flash_duration_self" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashDurationTeam

func (m *MatchPlayerMutation) OldFlashDurationTeam(ctx context.Context) (v float32, err error)

OldFlashDurationTeam returns the old "flash_duration_team" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashTotalEnemy

func (m *MatchPlayerMutation) OldFlashTotalEnemy(ctx context.Context) (v uint, err error)

OldFlashTotalEnemy returns the old "flash_total_enemy" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashTotalSelf

func (m *MatchPlayerMutation) OldFlashTotalSelf(ctx context.Context) (v uint, err error)

OldFlashTotalSelf returns the old "flash_total_self" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldFlashTotalTeam

func (m *MatchPlayerMutation) OldFlashTotalTeam(ctx context.Context) (v uint, err error)

OldFlashTotalTeam returns the old "flash_total_team" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldHeadshot

func (m *MatchPlayerMutation) OldHeadshot(ctx context.Context) (v int, err error)

OldHeadshot returns the old "headshot" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldKast

func (m *MatchPlayerMutation) OldKast(ctx context.Context) (v int, err error)

OldKast returns the old "kast" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldKills

func (m *MatchPlayerMutation) OldKills(ctx context.Context) (v int, err error)

OldKills returns the old "kills" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMatchStats

func (m *MatchPlayerMutation) OldMatchStats(ctx context.Context) (v uint64, err error)

OldMatchStats returns the old "match_stats" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMk2

func (m *MatchPlayerMutation) OldMk2(ctx context.Context) (v uint, err error)

OldMk2 returns the old "mk_2" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMk3

func (m *MatchPlayerMutation) OldMk3(ctx context.Context) (v uint, err error)

OldMk3 returns the old "mk_3" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMk4

func (m *MatchPlayerMutation) OldMk4(ctx context.Context) (v uint, err error)

OldMk4 returns the old "mk_4" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMk5

func (m *MatchPlayerMutation) OldMk5(ctx context.Context) (v uint, err error)

OldMk5 returns the old "mk_5" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldMvp

func (m *MatchPlayerMutation) OldMvp(ctx context.Context) (v uint, err error)

OldMvp returns the old "mvp" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldPlayerStats

func (m *MatchPlayerMutation) OldPlayerStats(ctx context.Context) (v uint64, err error)

OldPlayerStats returns the old "player_stats" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldRankNew

func (m *MatchPlayerMutation) OldRankNew(ctx context.Context) (v int, err error)

OldRankNew returns the old "rank_new" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldRankOld

func (m *MatchPlayerMutation) OldRankOld(ctx context.Context) (v int, err error)

OldRankOld returns the old "rank_old" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldScore

func (m *MatchPlayerMutation) OldScore(ctx context.Context) (v int, err error)

OldScore returns the old "score" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldTeamID

func (m *MatchPlayerMutation) OldTeamID(ctx context.Context) (v int, err error)

OldTeamID returns the old "team_id" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldUdDecoy

func (m *MatchPlayerMutation) OldUdDecoy(ctx context.Context) (v uint, err error)

OldUdDecoy returns the old "ud_decoy" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldUdFlames

func (m *MatchPlayerMutation) OldUdFlames(ctx context.Context) (v uint, err error)

OldUdFlames returns the old "ud_flames" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldUdFlash

func (m *MatchPlayerMutation) OldUdFlash(ctx context.Context) (v uint, err error)

OldUdFlash returns the old "ud_flash" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldUdHe

func (m *MatchPlayerMutation) OldUdHe(ctx context.Context) (v uint, err error)

OldUdHe returns the old "ud_he" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) OldUdSmoke

func (m *MatchPlayerMutation) OldUdSmoke(ctx context.Context) (v uint, err error)

OldUdSmoke returns the old "ud_smoke" field's value of the MatchPlayer entity. If the MatchPlayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MatchPlayerMutation) Op

func (m *MatchPlayerMutation) Op() Op

Op returns the operation name.

func (*MatchPlayerMutation) PlayerStats

func (m *MatchPlayerMutation) PlayerStats() (r uint64, exists bool)

PlayerStats returns the value of the "player_stats" field in the mutation.

func (*MatchPlayerMutation) PlayerStatsCleared

func (m *MatchPlayerMutation) PlayerStatsCleared() bool

PlayerStatsCleared returns if the "player_stats" field was cleared in this mutation.

func (*MatchPlayerMutation) PlayersCleared

func (m *MatchPlayerMutation) PlayersCleared() bool

PlayersCleared reports if the "players" edge to the Player entity was cleared.

func (*MatchPlayerMutation) PlayersID

func (m *MatchPlayerMutation) PlayersID() (id uint64, exists bool)

PlayersID returns the "players" edge ID in the mutation.

func (*MatchPlayerMutation) PlayersIDs

func (m *MatchPlayerMutation) PlayersIDs() (ids []uint64)

PlayersIDs returns the "players" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PlayersID instead. It exists only for internal usage by the builders.

func (*MatchPlayerMutation) RankNew

func (m *MatchPlayerMutation) RankNew() (r int, exists bool)

RankNew returns the value of the "rank_new" field in the mutation.

func (*MatchPlayerMutation) RankNewCleared

func (m *MatchPlayerMutation) RankNewCleared() bool

RankNewCleared returns if the "rank_new" field was cleared in this mutation.

func (*MatchPlayerMutation) RankOld

func (m *MatchPlayerMutation) RankOld() (r int, exists bool)

RankOld returns the value of the "rank_old" field in the mutation.

func (*MatchPlayerMutation) RankOldCleared

func (m *MatchPlayerMutation) RankOldCleared() bool

RankOldCleared returns if the "rank_old" field was cleared in this mutation.

func (*MatchPlayerMutation) RemoveMessageIDs

func (m *MatchPlayerMutation) RemoveMessageIDs(ids ...int)

RemoveMessageIDs removes the "messages" edge to the Messages entity by IDs.

func (*MatchPlayerMutation) RemoveRoundStatIDs

func (m *MatchPlayerMutation) RemoveRoundStatIDs(ids ...int)

RemoveRoundStatIDs removes the "round_stats" edge to the RoundStats entity by IDs.

func (*MatchPlayerMutation) RemoveSprayIDs

func (m *MatchPlayerMutation) RemoveSprayIDs(ids ...int)

RemoveSprayIDs removes the "spray" edge to the Spray entity by IDs.

func (*MatchPlayerMutation) RemoveWeaponStatIDs

func (m *MatchPlayerMutation) RemoveWeaponStatIDs(ids ...int)

RemoveWeaponStatIDs removes the "weapon_stats" edge to the Weapon entity by IDs.

func (*MatchPlayerMutation) RemovedEdges

func (m *MatchPlayerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MatchPlayerMutation) RemovedIDs

func (m *MatchPlayerMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MatchPlayerMutation) RemovedMessagesIDs

func (m *MatchPlayerMutation) RemovedMessagesIDs() (ids []int)

RemovedMessages returns the removed IDs of the "messages" edge to the Messages entity.

func (*MatchPlayerMutation) RemovedRoundStatsIDs

func (m *MatchPlayerMutation) RemovedRoundStatsIDs() (ids []int)

RemovedRoundStats returns the removed IDs of the "round_stats" edge to the RoundStats entity.

func (*MatchPlayerMutation) RemovedSprayIDs

func (m *MatchPlayerMutation) RemovedSprayIDs() (ids []int)

RemovedSpray returns the removed IDs of the "spray" edge to the Spray entity.

func (*MatchPlayerMutation) RemovedWeaponStatsIDs

func (m *MatchPlayerMutation) RemovedWeaponStatsIDs() (ids []int)

RemovedWeaponStats returns the removed IDs of the "weapon_stats" edge to the Weapon entity.

func (*MatchPlayerMutation) ResetAssists

func (m *MatchPlayerMutation) ResetAssists()

ResetAssists resets all changes to the "assists" field.

func (*MatchPlayerMutation) ResetColor

func (m *MatchPlayerMutation) ResetColor()

ResetColor resets all changes to the "color" field.

func (*MatchPlayerMutation) ResetCrosshair

func (m *MatchPlayerMutation) ResetCrosshair()

ResetCrosshair resets all changes to the "crosshair" field.

func (*MatchPlayerMutation) ResetDeaths

func (m *MatchPlayerMutation) ResetDeaths()

ResetDeaths resets all changes to the "deaths" field.

func (*MatchPlayerMutation) ResetDmgEnemy

func (m *MatchPlayerMutation) ResetDmgEnemy()

ResetDmgEnemy resets all changes to the "dmg_enemy" field.

func (*MatchPlayerMutation) ResetDmgTeam

func (m *MatchPlayerMutation) ResetDmgTeam()

ResetDmgTeam resets all changes to the "dmg_team" field.

func (*MatchPlayerMutation) ResetEdge

func (m *MatchPlayerMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*MatchPlayerMutation) ResetField

func (m *MatchPlayerMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*MatchPlayerMutation) ResetFlashAssists

func (m *MatchPlayerMutation) ResetFlashAssists()

ResetFlashAssists resets all changes to the "flash_assists" field.

func (*MatchPlayerMutation) ResetFlashDurationEnemy

func (m *MatchPlayerMutation) ResetFlashDurationEnemy()

ResetFlashDurationEnemy resets all changes to the "flash_duration_enemy" field.

func (*MatchPlayerMutation) ResetFlashDurationSelf

func (m *MatchPlayerMutation) ResetFlashDurationSelf()

ResetFlashDurationSelf resets all changes to the "flash_duration_self" field.

func (*MatchPlayerMutation) ResetFlashDurationTeam

func (m *MatchPlayerMutation) ResetFlashDurationTeam()

ResetFlashDurationTeam resets all changes to the "flash_duration_team" field.

func (*MatchPlayerMutation) ResetFlashTotalEnemy

func (m *MatchPlayerMutation) ResetFlashTotalEnemy()

ResetFlashTotalEnemy resets all changes to the "flash_total_enemy" field.

func (*MatchPlayerMutation) ResetFlashTotalSelf

func (m *MatchPlayerMutation) ResetFlashTotalSelf()

ResetFlashTotalSelf resets all changes to the "flash_total_self" field.

func (*MatchPlayerMutation) ResetFlashTotalTeam

func (m *MatchPlayerMutation) ResetFlashTotalTeam()

ResetFlashTotalTeam resets all changes to the "flash_total_team" field.

func (*MatchPlayerMutation) ResetHeadshot

func (m *MatchPlayerMutation) ResetHeadshot()

ResetHeadshot resets all changes to the "headshot" field.

func (*MatchPlayerMutation) ResetKast

func (m *MatchPlayerMutation) ResetKast()

ResetKast resets all changes to the "kast" field.

func (*MatchPlayerMutation) ResetKills

func (m *MatchPlayerMutation) ResetKills()

ResetKills resets all changes to the "kills" field.

func (*MatchPlayerMutation) ResetMatchStats

func (m *MatchPlayerMutation) ResetMatchStats()

ResetMatchStats resets all changes to the "match_stats" field.

func (*MatchPlayerMutation) ResetMatches

func (m *MatchPlayerMutation) ResetMatches()

ResetMatches resets all changes to the "matches" edge.

func (*MatchPlayerMutation) ResetMessages

func (m *MatchPlayerMutation) ResetMessages()

ResetMessages resets all changes to the "messages" edge.

func (*MatchPlayerMutation) ResetMk2

func (m *MatchPlayerMutation) ResetMk2()

ResetMk2 resets all changes to the "mk_2" field.

func (*MatchPlayerMutation) ResetMk3

func (m *MatchPlayerMutation) ResetMk3()

ResetMk3 resets all changes to the "mk_3" field.

func (*MatchPlayerMutation) ResetMk4

func (m *MatchPlayerMutation) ResetMk4()

ResetMk4 resets all changes to the "mk_4" field.

func (*MatchPlayerMutation) ResetMk5

func (m *MatchPlayerMutation) ResetMk5()

ResetMk5 resets all changes to the "mk_5" field.

func (*MatchPlayerMutation) ResetMvp

func (m *MatchPlayerMutation) ResetMvp()

ResetMvp resets all changes to the "mvp" field.

func (*MatchPlayerMutation) ResetPlayerStats

func (m *MatchPlayerMutation) ResetPlayerStats()

ResetPlayerStats resets all changes to the "player_stats" field.

func (*MatchPlayerMutation) ResetPlayers

func (m *MatchPlayerMutation) ResetPlayers()

ResetPlayers resets all changes to the "players" edge.

func (*MatchPlayerMutation) ResetRankNew

func (m *MatchPlayerMutation) ResetRankNew()

ResetRankNew resets all changes to the "rank_new" field.

func (*MatchPlayerMutation) ResetRankOld

func (m *MatchPlayerMutation) ResetRankOld()

ResetRankOld resets all changes to the "rank_old" field.

func (*MatchPlayerMutation) ResetRoundStats

func (m *MatchPlayerMutation) ResetRoundStats()

ResetRoundStats resets all changes to the "round_stats" edge.

func (*MatchPlayerMutation) ResetScore

func (m *MatchPlayerMutation) ResetScore()

ResetScore resets all changes to the "score" field.

func (*MatchPlayerMutation) ResetSpray

func (m *MatchPlayerMutation) ResetSpray()

ResetSpray resets all changes to the "spray" edge.

func (*MatchPlayerMutation) ResetTeamID

func (m *MatchPlayerMutation) ResetTeamID()

ResetTeamID resets all changes to the "team_id" field.

func (*MatchPlayerMutation) ResetUdDecoy

func (m *MatchPlayerMutation) ResetUdDecoy()

ResetUdDecoy resets all changes to the "ud_decoy" field.

func (*MatchPlayerMutation) ResetUdFlames

func (m *MatchPlayerMutation) ResetUdFlames()

ResetUdFlames resets all changes to the "ud_flames" field.

func (*MatchPlayerMutation) ResetUdFlash

func (m *MatchPlayerMutation) ResetUdFlash()

ResetUdFlash resets all changes to the "ud_flash" field.

func (*MatchPlayerMutation) ResetUdHe

func (m *MatchPlayerMutation) ResetUdHe()

ResetUdHe resets all changes to the "ud_he" field.

func (*MatchPlayerMutation) ResetUdSmoke

func (m *MatchPlayerMutation) ResetUdSmoke()

ResetUdSmoke resets all changes to the "ud_smoke" field.

func (*MatchPlayerMutation) ResetWeaponStats

func (m *MatchPlayerMutation) ResetWeaponStats()

ResetWeaponStats resets all changes to the "weapon_stats" edge.

func (*MatchPlayerMutation) RoundStatsCleared

func (m *MatchPlayerMutation) RoundStatsCleared() bool

RoundStatsCleared reports if the "round_stats" edge to the RoundStats entity was cleared.

func (*MatchPlayerMutation) RoundStatsIDs

func (m *MatchPlayerMutation) RoundStatsIDs() (ids []int)

RoundStatsIDs returns the "round_stats" edge IDs in the mutation.

func (*MatchPlayerMutation) Score

func (m *MatchPlayerMutation) Score() (r int, exists bool)

Score returns the value of the "score" field in the mutation.

func (*MatchPlayerMutation) SetAssists

func (m *MatchPlayerMutation) SetAssists(i int)

SetAssists sets the "assists" field.

func (*MatchPlayerMutation) SetColor

func (m *MatchPlayerMutation) SetColor(value matchplayer.Color)

SetColor sets the "color" field.

func (*MatchPlayerMutation) SetCrosshair

func (m *MatchPlayerMutation) SetCrosshair(s string)

SetCrosshair sets the "crosshair" field.

func (*MatchPlayerMutation) SetDeaths

func (m *MatchPlayerMutation) SetDeaths(i int)

SetDeaths sets the "deaths" field.

func (*MatchPlayerMutation) SetDmgEnemy

func (m *MatchPlayerMutation) SetDmgEnemy(u uint)

SetDmgEnemy sets the "dmg_enemy" field.

func (*MatchPlayerMutation) SetDmgTeam

func (m *MatchPlayerMutation) SetDmgTeam(u uint)

SetDmgTeam sets the "dmg_team" field.

func (*MatchPlayerMutation) SetField

func (m *MatchPlayerMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MatchPlayerMutation) SetFlashAssists

func (m *MatchPlayerMutation) SetFlashAssists(i int)

SetFlashAssists sets the "flash_assists" field.

func (*MatchPlayerMutation) SetFlashDurationEnemy

func (m *MatchPlayerMutation) SetFlashDurationEnemy(f float32)

SetFlashDurationEnemy sets the "flash_duration_enemy" field.

func (*MatchPlayerMutation) SetFlashDurationSelf

func (m *MatchPlayerMutation) SetFlashDurationSelf(f float32)

SetFlashDurationSelf sets the "flash_duration_self" field.

func (*MatchPlayerMutation) SetFlashDurationTeam

func (m *MatchPlayerMutation) SetFlashDurationTeam(f float32)

SetFlashDurationTeam sets the "flash_duration_team" field.

func (*MatchPlayerMutation) SetFlashTotalEnemy

func (m *MatchPlayerMutation) SetFlashTotalEnemy(u uint)

SetFlashTotalEnemy sets the "flash_total_enemy" field.

func (*MatchPlayerMutation) SetFlashTotalSelf

func (m *MatchPlayerMutation) SetFlashTotalSelf(u uint)

SetFlashTotalSelf sets the "flash_total_self" field.

func (*MatchPlayerMutation) SetFlashTotalTeam

func (m *MatchPlayerMutation) SetFlashTotalTeam(u uint)

SetFlashTotalTeam sets the "flash_total_team" field.

func (*MatchPlayerMutation) SetHeadshot

func (m *MatchPlayerMutation) SetHeadshot(i int)

SetHeadshot sets the "headshot" field.

func (*MatchPlayerMutation) SetKast

func (m *MatchPlayerMutation) SetKast(i int)

SetKast sets the "kast" field.

func (*MatchPlayerMutation) SetKills

func (m *MatchPlayerMutation) SetKills(i int)

SetKills sets the "kills" field.

func (*MatchPlayerMutation) SetMatchStats

func (m *MatchPlayerMutation) SetMatchStats(u uint64)

SetMatchStats sets the "match_stats" field.

func (*MatchPlayerMutation) SetMatchesID

func (m *MatchPlayerMutation) SetMatchesID(id uint64)

SetMatchesID sets the "matches" edge to the Match entity by id.

func (*MatchPlayerMutation) SetMk2

func (m *MatchPlayerMutation) SetMk2(u uint)

SetMk2 sets the "mk_2" field.

func (*MatchPlayerMutation) SetMk3

func (m *MatchPlayerMutation) SetMk3(u uint)

SetMk3 sets the "mk_3" field.

func (*MatchPlayerMutation) SetMk4

func (m *MatchPlayerMutation) SetMk4(u uint)

SetMk4 sets the "mk_4" field.

func (*MatchPlayerMutation) SetMk5

func (m *MatchPlayerMutation) SetMk5(u uint)

SetMk5 sets the "mk_5" field.

func (*MatchPlayerMutation) SetMvp

func (m *MatchPlayerMutation) SetMvp(u uint)

SetMvp sets the "mvp" field.

func (*MatchPlayerMutation) SetPlayerStats

func (m *MatchPlayerMutation) SetPlayerStats(u uint64)

SetPlayerStats sets the "player_stats" field.

func (*MatchPlayerMutation) SetPlayersID

func (m *MatchPlayerMutation) SetPlayersID(id uint64)

SetPlayersID sets the "players" edge to the Player entity by id.

func (*MatchPlayerMutation) SetRankNew

func (m *MatchPlayerMutation) SetRankNew(i int)

SetRankNew sets the "rank_new" field.

func (*MatchPlayerMutation) SetRankOld

func (m *MatchPlayerMutation) SetRankOld(i int)

SetRankOld sets the "rank_old" field.

func (*MatchPlayerMutation) SetScore

func (m *MatchPlayerMutation) SetScore(i int)

SetScore sets the "score" field.

func (*MatchPlayerMutation) SetTeamID

func (m *MatchPlayerMutation) SetTeamID(i int)

SetTeamID sets the "team_id" field.

func (*MatchPlayerMutation) SetUdDecoy

func (m *MatchPlayerMutation) SetUdDecoy(u uint)

SetUdDecoy sets the "ud_decoy" field.

func (*MatchPlayerMutation) SetUdFlames

func (m *MatchPlayerMutation) SetUdFlames(u uint)

SetUdFlames sets the "ud_flames" field.

func (*MatchPlayerMutation) SetUdFlash

func (m *MatchPlayerMutation) SetUdFlash(u uint)

SetUdFlash sets the "ud_flash" field.

func (*MatchPlayerMutation) SetUdHe

func (m *MatchPlayerMutation) SetUdHe(u uint)

SetUdHe sets the "ud_he" field.

func (*MatchPlayerMutation) SetUdSmoke

func (m *MatchPlayerMutation) SetUdSmoke(u uint)

SetUdSmoke sets the "ud_smoke" field.

func (*MatchPlayerMutation) SprayCleared

func (m *MatchPlayerMutation) SprayCleared() bool

SprayCleared reports if the "spray" edge to the Spray entity was cleared.

func (*MatchPlayerMutation) SprayIDs

func (m *MatchPlayerMutation) SprayIDs() (ids []int)

SprayIDs returns the "spray" edge IDs in the mutation.

func (*MatchPlayerMutation) TeamID

func (m *MatchPlayerMutation) TeamID() (r int, exists bool)

TeamID returns the value of the "team_id" field in the mutation.

func (MatchPlayerMutation) Tx

func (m MatchPlayerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MatchPlayerMutation) Type

func (m *MatchPlayerMutation) Type() string

Type returns the node type of this mutation (MatchPlayer).

func (*MatchPlayerMutation) UdDecoy

func (m *MatchPlayerMutation) UdDecoy() (r uint, exists bool)

UdDecoy returns the value of the "ud_decoy" field in the mutation.

func (*MatchPlayerMutation) UdDecoyCleared

func (m *MatchPlayerMutation) UdDecoyCleared() bool

UdDecoyCleared returns if the "ud_decoy" field was cleared in this mutation.

func (*MatchPlayerMutation) UdFlames

func (m *MatchPlayerMutation) UdFlames() (r uint, exists bool)

UdFlames returns the value of the "ud_flames" field in the mutation.

func (*MatchPlayerMutation) UdFlamesCleared

func (m *MatchPlayerMutation) UdFlamesCleared() bool

UdFlamesCleared returns if the "ud_flames" field was cleared in this mutation.

func (*MatchPlayerMutation) UdFlash

func (m *MatchPlayerMutation) UdFlash() (r uint, exists bool)

UdFlash returns the value of the "ud_flash" field in the mutation.

func (*MatchPlayerMutation) UdFlashCleared

func (m *MatchPlayerMutation) UdFlashCleared() bool

UdFlashCleared returns if the "ud_flash" field was cleared in this mutation.

func (*MatchPlayerMutation) UdHe

func (m *MatchPlayerMutation) UdHe() (r uint, exists bool)

UdHe returns the value of the "ud_he" field in the mutation.

func (*MatchPlayerMutation) UdHeCleared

func (m *MatchPlayerMutation) UdHeCleared() bool

UdHeCleared returns if the "ud_he" field was cleared in this mutation.

func (*MatchPlayerMutation) UdSmoke

func (m *MatchPlayerMutation) UdSmoke() (r uint, exists bool)

UdSmoke returns the value of the "ud_smoke" field in the mutation.

func (*MatchPlayerMutation) UdSmokeCleared

func (m *MatchPlayerMutation) UdSmokeCleared() bool

UdSmokeCleared returns if the "ud_smoke" field was cleared in this mutation.

func (*MatchPlayerMutation) WeaponStatsCleared

func (m *MatchPlayerMutation) WeaponStatsCleared() bool

WeaponStatsCleared reports if the "weapon_stats" edge to the Weapon entity was cleared.

func (*MatchPlayerMutation) WeaponStatsIDs

func (m *MatchPlayerMutation) WeaponStatsIDs() (ids []int)

WeaponStatsIDs returns the "weapon_stats" edge IDs in the mutation.

func (*MatchPlayerMutation) Where

func (m *MatchPlayerMutation) Where(ps ...predicate.MatchPlayer)

Where appends a list predicates to the MatchPlayerMutation builder.

type MatchPlayerQuery

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

MatchPlayerQuery is the builder for querying MatchPlayer entities.

func (*MatchPlayerQuery) All

func (mpq *MatchPlayerQuery) All(ctx context.Context) ([]*MatchPlayer, error)

All executes the query and returns a list of MatchPlayers.

func (*MatchPlayerQuery) AllX

func (mpq *MatchPlayerQuery) AllX(ctx context.Context) []*MatchPlayer

AllX is like All, but panics if an error occurs.

func (*MatchPlayerQuery) Clone

func (mpq *MatchPlayerQuery) Clone() *MatchPlayerQuery

Clone returns a duplicate of the MatchPlayerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MatchPlayerQuery) Count

func (mpq *MatchPlayerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MatchPlayerQuery) CountX

func (mpq *MatchPlayerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MatchPlayerQuery) Exist

func (mpq *MatchPlayerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MatchPlayerQuery) ExistX

func (mpq *MatchPlayerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MatchPlayerQuery) First

func (mpq *MatchPlayerQuery) First(ctx context.Context) (*MatchPlayer, error)

First returns the first MatchPlayer entity from the query. Returns a *NotFoundError when no MatchPlayer was found.

func (*MatchPlayerQuery) FirstID

func (mpq *MatchPlayerQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MatchPlayer ID from the query. Returns a *NotFoundError when no MatchPlayer ID was found.

func (*MatchPlayerQuery) FirstIDX

func (mpq *MatchPlayerQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MatchPlayerQuery) FirstX

func (mpq *MatchPlayerQuery) FirstX(ctx context.Context) *MatchPlayer

FirstX is like First, but panics if an error occurs.

func (*MatchPlayerQuery) GroupBy

func (mpq *MatchPlayerQuery) GroupBy(field string, fields ...string) *MatchPlayerGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	TeamID int `json:"team_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MatchPlayer.Query().
	GroupBy(matchplayer.FieldTeamID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MatchPlayerQuery) IDs

func (mpq *MatchPlayerQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MatchPlayer IDs.

func (*MatchPlayerQuery) IDsX

func (mpq *MatchPlayerQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MatchPlayerQuery) Limit

func (mpq *MatchPlayerQuery) Limit(limit int) *MatchPlayerQuery

Limit adds a limit step to the query.

func (*MatchPlayerQuery) Modify

func (mpq *MatchPlayerQuery) Modify(modifiers ...func(s *sql.Selector)) *MatchPlayerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MatchPlayerQuery) Offset

func (mpq *MatchPlayerQuery) Offset(offset int) *MatchPlayerQuery

Offset adds an offset step to the query.

func (*MatchPlayerQuery) Only

func (mpq *MatchPlayerQuery) Only(ctx context.Context) (*MatchPlayer, error)

Only returns a single MatchPlayer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MatchPlayer entity is found. Returns a *NotFoundError when no MatchPlayer entities are found.

func (*MatchPlayerQuery) OnlyID

func (mpq *MatchPlayerQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MatchPlayer ID in the query. Returns a *NotSingularError when more than one MatchPlayer ID is found. Returns a *NotFoundError when no entities are found.

func (*MatchPlayerQuery) OnlyIDX

func (mpq *MatchPlayerQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MatchPlayerQuery) OnlyX

func (mpq *MatchPlayerQuery) OnlyX(ctx context.Context) *MatchPlayer

OnlyX is like Only, but panics if an error occurs.

func (*MatchPlayerQuery) Order

func (mpq *MatchPlayerQuery) Order(o ...OrderFunc) *MatchPlayerQuery

Order adds an order step to the query.

func (*MatchPlayerQuery) QueryMatches

func (mpq *MatchPlayerQuery) QueryMatches() *MatchQuery

QueryMatches chains the current query on the "matches" edge.

func (*MatchPlayerQuery) QueryMessages

func (mpq *MatchPlayerQuery) QueryMessages() *MessagesQuery

QueryMessages chains the current query on the "messages" edge.

func (*MatchPlayerQuery) QueryPlayers

func (mpq *MatchPlayerQuery) QueryPlayers() *PlayerQuery

QueryPlayers chains the current query on the "players" edge.

func (*MatchPlayerQuery) QueryRoundStats

func (mpq *MatchPlayerQuery) QueryRoundStats() *RoundStatsQuery

QueryRoundStats chains the current query on the "round_stats" edge.

func (*MatchPlayerQuery) QuerySpray

func (mpq *MatchPlayerQuery) QuerySpray() *SprayQuery

QuerySpray chains the current query on the "spray" edge.

func (*MatchPlayerQuery) QueryWeaponStats

func (mpq *MatchPlayerQuery) QueryWeaponStats() *WeaponQuery

QueryWeaponStats chains the current query on the "weapon_stats" edge.

func (*MatchPlayerQuery) Select

func (mpq *MatchPlayerQuery) Select(fields ...string) *MatchPlayerSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	TeamID int `json:"team_id,omitempty"`
}

client.MatchPlayer.Query().
	Select(matchplayer.FieldTeamID).
	Scan(ctx, &v)

func (*MatchPlayerQuery) Unique

func (mpq *MatchPlayerQuery) Unique(unique bool) *MatchPlayerQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MatchPlayerQuery) Where

Where adds a new predicate for the MatchPlayerQuery builder.

func (*MatchPlayerQuery) WithMatches

func (mpq *MatchPlayerQuery) WithMatches(opts ...func(*MatchQuery)) *MatchPlayerQuery

WithMatches tells the query-builder to eager-load the nodes that are connected to the "matches" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchPlayerQuery) WithMessages

func (mpq *MatchPlayerQuery) WithMessages(opts ...func(*MessagesQuery)) *MatchPlayerQuery

WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchPlayerQuery) WithPlayers

func (mpq *MatchPlayerQuery) WithPlayers(opts ...func(*PlayerQuery)) *MatchPlayerQuery

WithPlayers tells the query-builder to eager-load the nodes that are connected to the "players" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchPlayerQuery) WithRoundStats

func (mpq *MatchPlayerQuery) WithRoundStats(opts ...func(*RoundStatsQuery)) *MatchPlayerQuery

WithRoundStats tells the query-builder to eager-load the nodes that are connected to the "round_stats" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchPlayerQuery) WithSpray

func (mpq *MatchPlayerQuery) WithSpray(opts ...func(*SprayQuery)) *MatchPlayerQuery

WithSpray tells the query-builder to eager-load the nodes that are connected to the "spray" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchPlayerQuery) WithWeaponStats

func (mpq *MatchPlayerQuery) WithWeaponStats(opts ...func(*WeaponQuery)) *MatchPlayerQuery

WithWeaponStats tells the query-builder to eager-load the nodes that are connected to the "weapon_stats" edge. The optional arguments are used to configure the query builder of the edge.

type MatchPlayerSelect

type MatchPlayerSelect struct {
	*MatchPlayerQuery
	// contains filtered or unexported fields
}

MatchPlayerSelect is the builder for selecting fields of MatchPlayer entities.

func (*MatchPlayerSelect) Bool

func (s *MatchPlayerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) BoolX

func (s *MatchPlayerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MatchPlayerSelect) Bools

func (s *MatchPlayerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) BoolsX

func (s *MatchPlayerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MatchPlayerSelect) Float64

func (s *MatchPlayerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) Float64X

func (s *MatchPlayerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MatchPlayerSelect) Float64s

func (s *MatchPlayerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) Float64sX

func (s *MatchPlayerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MatchPlayerSelect) Int

func (s *MatchPlayerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) IntX

func (s *MatchPlayerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MatchPlayerSelect) Ints

func (s *MatchPlayerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) IntsX

func (s *MatchPlayerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MatchPlayerSelect) Modify

func (mps *MatchPlayerSelect) Modify(modifiers ...func(s *sql.Selector)) *MatchPlayerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MatchPlayerSelect) Scan

func (mps *MatchPlayerSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*MatchPlayerSelect) ScanX

func (s *MatchPlayerSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MatchPlayerSelect) String

func (s *MatchPlayerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) StringX

func (s *MatchPlayerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MatchPlayerSelect) Strings

func (s *MatchPlayerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MatchPlayerSelect) StringsX

func (s *MatchPlayerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MatchPlayerUpdate

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

MatchPlayerUpdate is the builder for updating MatchPlayer entities.

func (*MatchPlayerUpdate) AddAssists

func (mpu *MatchPlayerUpdate) AddAssists(i int) *MatchPlayerUpdate

AddAssists adds i to the "assists" field.

func (*MatchPlayerUpdate) AddDeaths

func (mpu *MatchPlayerUpdate) AddDeaths(i int) *MatchPlayerUpdate

AddDeaths adds i to the "deaths" field.

func (*MatchPlayerUpdate) AddDmgEnemy

func (mpu *MatchPlayerUpdate) AddDmgEnemy(u int) *MatchPlayerUpdate

AddDmgEnemy adds u to the "dmg_enemy" field.

func (*MatchPlayerUpdate) AddDmgTeam

func (mpu *MatchPlayerUpdate) AddDmgTeam(u int) *MatchPlayerUpdate

AddDmgTeam adds u to the "dmg_team" field.

func (*MatchPlayerUpdate) AddFlashAssists

func (mpu *MatchPlayerUpdate) AddFlashAssists(i int) *MatchPlayerUpdate

AddFlashAssists adds i to the "flash_assists" field.

func (*MatchPlayerUpdate) AddFlashDurationEnemy

func (mpu *MatchPlayerUpdate) AddFlashDurationEnemy(f float32) *MatchPlayerUpdate

AddFlashDurationEnemy adds f to the "flash_duration_enemy" field.

func (*MatchPlayerUpdate) AddFlashDurationSelf

func (mpu *MatchPlayerUpdate) AddFlashDurationSelf(f float32) *MatchPlayerUpdate

AddFlashDurationSelf adds f to the "flash_duration_self" field.

func (*MatchPlayerUpdate) AddFlashDurationTeam

func (mpu *MatchPlayerUpdate) AddFlashDurationTeam(f float32) *MatchPlayerUpdate

AddFlashDurationTeam adds f to the "flash_duration_team" field.

func (*MatchPlayerUpdate) AddFlashTotalEnemy

func (mpu *MatchPlayerUpdate) AddFlashTotalEnemy(u int) *MatchPlayerUpdate

AddFlashTotalEnemy adds u to the "flash_total_enemy" field.

func (*MatchPlayerUpdate) AddFlashTotalSelf

func (mpu *MatchPlayerUpdate) AddFlashTotalSelf(u int) *MatchPlayerUpdate

AddFlashTotalSelf adds u to the "flash_total_self" field.

func (*MatchPlayerUpdate) AddFlashTotalTeam

func (mpu *MatchPlayerUpdate) AddFlashTotalTeam(u int) *MatchPlayerUpdate

AddFlashTotalTeam adds u to the "flash_total_team" field.

func (*MatchPlayerUpdate) AddHeadshot

func (mpu *MatchPlayerUpdate) AddHeadshot(i int) *MatchPlayerUpdate

AddHeadshot adds i to the "headshot" field.

func (*MatchPlayerUpdate) AddKast

func (mpu *MatchPlayerUpdate) AddKast(i int) *MatchPlayerUpdate

AddKast adds i to the "kast" field.

func (*MatchPlayerUpdate) AddKills

func (mpu *MatchPlayerUpdate) AddKills(i int) *MatchPlayerUpdate

AddKills adds i to the "kills" field.

func (*MatchPlayerUpdate) AddMessageIDs

func (mpu *MatchPlayerUpdate) AddMessageIDs(ids ...int) *MatchPlayerUpdate

AddMessageIDs adds the "messages" edge to the Messages entity by IDs.

func (*MatchPlayerUpdate) AddMessages

func (mpu *MatchPlayerUpdate) AddMessages(m ...*Messages) *MatchPlayerUpdate

AddMessages adds the "messages" edges to the Messages entity.

func (*MatchPlayerUpdate) AddMk2

func (mpu *MatchPlayerUpdate) AddMk2(u int) *MatchPlayerUpdate

AddMk2 adds u to the "mk_2" field.

func (*MatchPlayerUpdate) AddMk3

func (mpu *MatchPlayerUpdate) AddMk3(u int) *MatchPlayerUpdate

AddMk3 adds u to the "mk_3" field.

func (*MatchPlayerUpdate) AddMk4

func (mpu *MatchPlayerUpdate) AddMk4(u int) *MatchPlayerUpdate

AddMk4 adds u to the "mk_4" field.

func (*MatchPlayerUpdate) AddMk5

func (mpu *MatchPlayerUpdate) AddMk5(u int) *MatchPlayerUpdate

AddMk5 adds u to the "mk_5" field.

func (*MatchPlayerUpdate) AddMvp

func (mpu *MatchPlayerUpdate) AddMvp(u int) *MatchPlayerUpdate

AddMvp adds u to the "mvp" field.

func (*MatchPlayerUpdate) AddRankNew

func (mpu *MatchPlayerUpdate) AddRankNew(i int) *MatchPlayerUpdate

AddRankNew adds i to the "rank_new" field.

func (*MatchPlayerUpdate) AddRankOld

func (mpu *MatchPlayerUpdate) AddRankOld(i int) *MatchPlayerUpdate

AddRankOld adds i to the "rank_old" field.

func (*MatchPlayerUpdate) AddRoundStatIDs

func (mpu *MatchPlayerUpdate) AddRoundStatIDs(ids ...int) *MatchPlayerUpdate

AddRoundStatIDs adds the "round_stats" edge to the RoundStats entity by IDs.

func (*MatchPlayerUpdate) AddRoundStats

func (mpu *MatchPlayerUpdate) AddRoundStats(r ...*RoundStats) *MatchPlayerUpdate

AddRoundStats adds the "round_stats" edges to the RoundStats entity.

func (*MatchPlayerUpdate) AddScore

func (mpu *MatchPlayerUpdate) AddScore(i int) *MatchPlayerUpdate

AddScore adds i to the "score" field.

func (*MatchPlayerUpdate) AddSpray

func (mpu *MatchPlayerUpdate) AddSpray(s ...*Spray) *MatchPlayerUpdate

AddSpray adds the "spray" edges to the Spray entity.

func (*MatchPlayerUpdate) AddSprayIDs

func (mpu *MatchPlayerUpdate) AddSprayIDs(ids ...int) *MatchPlayerUpdate

AddSprayIDs adds the "spray" edge to the Spray entity by IDs.

func (*MatchPlayerUpdate) AddTeamID

func (mpu *MatchPlayerUpdate) AddTeamID(i int) *MatchPlayerUpdate

AddTeamID adds i to the "team_id" field.

func (*MatchPlayerUpdate) AddUdDecoy

func (mpu *MatchPlayerUpdate) AddUdDecoy(u int) *MatchPlayerUpdate

AddUdDecoy adds u to the "ud_decoy" field.

func (*MatchPlayerUpdate) AddUdFlames

func (mpu *MatchPlayerUpdate) AddUdFlames(u int) *MatchPlayerUpdate

AddUdFlames adds u to the "ud_flames" field.

func (*MatchPlayerUpdate) AddUdFlash

func (mpu *MatchPlayerUpdate) AddUdFlash(u int) *MatchPlayerUpdate

AddUdFlash adds u to the "ud_flash" field.

func (*MatchPlayerUpdate) AddUdHe

func (mpu *MatchPlayerUpdate) AddUdHe(u int) *MatchPlayerUpdate

AddUdHe adds u to the "ud_he" field.

func (*MatchPlayerUpdate) AddUdSmoke

func (mpu *MatchPlayerUpdate) AddUdSmoke(u int) *MatchPlayerUpdate

AddUdSmoke adds u to the "ud_smoke" field.

func (*MatchPlayerUpdate) AddWeaponStatIDs

func (mpu *MatchPlayerUpdate) AddWeaponStatIDs(ids ...int) *MatchPlayerUpdate

AddWeaponStatIDs adds the "weapon_stats" edge to the Weapon entity by IDs.

func (*MatchPlayerUpdate) AddWeaponStats

func (mpu *MatchPlayerUpdate) AddWeaponStats(w ...*Weapon) *MatchPlayerUpdate

AddWeaponStats adds the "weapon_stats" edges to the Weapon entity.

func (*MatchPlayerUpdate) ClearColor

func (mpu *MatchPlayerUpdate) ClearColor() *MatchPlayerUpdate

ClearColor clears the value of the "color" field.

func (*MatchPlayerUpdate) ClearCrosshair

func (mpu *MatchPlayerUpdate) ClearCrosshair() *MatchPlayerUpdate

ClearCrosshair clears the value of the "crosshair" field.

func (*MatchPlayerUpdate) ClearDmgEnemy

func (mpu *MatchPlayerUpdate) ClearDmgEnemy() *MatchPlayerUpdate

ClearDmgEnemy clears the value of the "dmg_enemy" field.

func (*MatchPlayerUpdate) ClearDmgTeam

func (mpu *MatchPlayerUpdate) ClearDmgTeam() *MatchPlayerUpdate

ClearDmgTeam clears the value of the "dmg_team" field.

func (*MatchPlayerUpdate) ClearFlashAssists

func (mpu *MatchPlayerUpdate) ClearFlashAssists() *MatchPlayerUpdate

ClearFlashAssists clears the value of the "flash_assists" field.

func (*MatchPlayerUpdate) ClearFlashDurationEnemy

func (mpu *MatchPlayerUpdate) ClearFlashDurationEnemy() *MatchPlayerUpdate

ClearFlashDurationEnemy clears the value of the "flash_duration_enemy" field.

func (*MatchPlayerUpdate) ClearFlashDurationSelf

func (mpu *MatchPlayerUpdate) ClearFlashDurationSelf() *MatchPlayerUpdate

ClearFlashDurationSelf clears the value of the "flash_duration_self" field.

func (*MatchPlayerUpdate) ClearFlashDurationTeam

func (mpu *MatchPlayerUpdate) ClearFlashDurationTeam() *MatchPlayerUpdate

ClearFlashDurationTeam clears the value of the "flash_duration_team" field.

func (*MatchPlayerUpdate) ClearFlashTotalEnemy

func (mpu *MatchPlayerUpdate) ClearFlashTotalEnemy() *MatchPlayerUpdate

ClearFlashTotalEnemy clears the value of the "flash_total_enemy" field.

func (*MatchPlayerUpdate) ClearFlashTotalSelf

func (mpu *MatchPlayerUpdate) ClearFlashTotalSelf() *MatchPlayerUpdate

ClearFlashTotalSelf clears the value of the "flash_total_self" field.

func (*MatchPlayerUpdate) ClearFlashTotalTeam

func (mpu *MatchPlayerUpdate) ClearFlashTotalTeam() *MatchPlayerUpdate

ClearFlashTotalTeam clears the value of the "flash_total_team" field.

func (*MatchPlayerUpdate) ClearKast

func (mpu *MatchPlayerUpdate) ClearKast() *MatchPlayerUpdate

ClearKast clears the value of the "kast" field.

func (*MatchPlayerUpdate) ClearMatchStats

func (mpu *MatchPlayerUpdate) ClearMatchStats() *MatchPlayerUpdate

ClearMatchStats clears the value of the "match_stats" field.

func (*MatchPlayerUpdate) ClearMatches

func (mpu *MatchPlayerUpdate) ClearMatches() *MatchPlayerUpdate

ClearMatches clears the "matches" edge to the Match entity.

func (*MatchPlayerUpdate) ClearMessages

func (mpu *MatchPlayerUpdate) ClearMessages() *MatchPlayerUpdate

ClearMessages clears all "messages" edges to the Messages entity.

func (*MatchPlayerUpdate) ClearMk2

func (mpu *MatchPlayerUpdate) ClearMk2() *MatchPlayerUpdate

ClearMk2 clears the value of the "mk_2" field.

func (*MatchPlayerUpdate) ClearMk3

func (mpu *MatchPlayerUpdate) ClearMk3() *MatchPlayerUpdate

ClearMk3 clears the value of the "mk_3" field.

func (*MatchPlayerUpdate) ClearMk4

func (mpu *MatchPlayerUpdate) ClearMk4() *MatchPlayerUpdate

ClearMk4 clears the value of the "mk_4" field.

func (*MatchPlayerUpdate) ClearMk5

func (mpu *MatchPlayerUpdate) ClearMk5() *MatchPlayerUpdate

ClearMk5 clears the value of the "mk_5" field.

func (*MatchPlayerUpdate) ClearPlayerStats

func (mpu *MatchPlayerUpdate) ClearPlayerStats() *MatchPlayerUpdate

ClearPlayerStats clears the value of the "player_stats" field.

func (*MatchPlayerUpdate) ClearPlayers

func (mpu *MatchPlayerUpdate) ClearPlayers() *MatchPlayerUpdate

ClearPlayers clears the "players" edge to the Player entity.

func (*MatchPlayerUpdate) ClearRankNew

func (mpu *MatchPlayerUpdate) ClearRankNew() *MatchPlayerUpdate

ClearRankNew clears the value of the "rank_new" field.

func (*MatchPlayerUpdate) ClearRankOld

func (mpu *MatchPlayerUpdate) ClearRankOld() *MatchPlayerUpdate

ClearRankOld clears the value of the "rank_old" field.

func (*MatchPlayerUpdate) ClearRoundStats

func (mpu *MatchPlayerUpdate) ClearRoundStats() *MatchPlayerUpdate

ClearRoundStats clears all "round_stats" edges to the RoundStats entity.

func (*MatchPlayerUpdate) ClearSpray

func (mpu *MatchPlayerUpdate) ClearSpray() *MatchPlayerUpdate

ClearSpray clears all "spray" edges to the Spray entity.

func (*MatchPlayerUpdate) ClearUdDecoy

func (mpu *MatchPlayerUpdate) ClearUdDecoy() *MatchPlayerUpdate

ClearUdDecoy clears the value of the "ud_decoy" field.

func (*MatchPlayerUpdate) ClearUdFlames

func (mpu *MatchPlayerUpdate) ClearUdFlames() *MatchPlayerUpdate

ClearUdFlames clears the value of the "ud_flames" field.

func (*MatchPlayerUpdate) ClearUdFlash

func (mpu *MatchPlayerUpdate) ClearUdFlash() *MatchPlayerUpdate

ClearUdFlash clears the value of the "ud_flash" field.

func (*MatchPlayerUpdate) ClearUdHe

func (mpu *MatchPlayerUpdate) ClearUdHe() *MatchPlayerUpdate

ClearUdHe clears the value of the "ud_he" field.

func (*MatchPlayerUpdate) ClearUdSmoke

func (mpu *MatchPlayerUpdate) ClearUdSmoke() *MatchPlayerUpdate

ClearUdSmoke clears the value of the "ud_smoke" field.

func (*MatchPlayerUpdate) ClearWeaponStats

func (mpu *MatchPlayerUpdate) ClearWeaponStats() *MatchPlayerUpdate

ClearWeaponStats clears all "weapon_stats" edges to the Weapon entity.

func (*MatchPlayerUpdate) Exec

func (mpu *MatchPlayerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchPlayerUpdate) ExecX

func (mpu *MatchPlayerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchPlayerUpdate) Modify

func (mpu *MatchPlayerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchPlayerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MatchPlayerUpdate) Mutation

func (mpu *MatchPlayerUpdate) Mutation() *MatchPlayerMutation

Mutation returns the MatchPlayerMutation object of the builder.

func (*MatchPlayerUpdate) RemoveMessageIDs

func (mpu *MatchPlayerUpdate) RemoveMessageIDs(ids ...int) *MatchPlayerUpdate

RemoveMessageIDs removes the "messages" edge to Messages entities by IDs.

func (*MatchPlayerUpdate) RemoveMessages

func (mpu *MatchPlayerUpdate) RemoveMessages(m ...*Messages) *MatchPlayerUpdate

RemoveMessages removes "messages" edges to Messages entities.

func (*MatchPlayerUpdate) RemoveRoundStatIDs

func (mpu *MatchPlayerUpdate) RemoveRoundStatIDs(ids ...int) *MatchPlayerUpdate

RemoveRoundStatIDs removes the "round_stats" edge to RoundStats entities by IDs.

func (*MatchPlayerUpdate) RemoveRoundStats

func (mpu *MatchPlayerUpdate) RemoveRoundStats(r ...*RoundStats) *MatchPlayerUpdate

RemoveRoundStats removes "round_stats" edges to RoundStats entities.

func (*MatchPlayerUpdate) RemoveSpray

func (mpu *MatchPlayerUpdate) RemoveSpray(s ...*Spray) *MatchPlayerUpdate

RemoveSpray removes "spray" edges to Spray entities.

func (*MatchPlayerUpdate) RemoveSprayIDs

func (mpu *MatchPlayerUpdate) RemoveSprayIDs(ids ...int) *MatchPlayerUpdate

RemoveSprayIDs removes the "spray" edge to Spray entities by IDs.

func (*MatchPlayerUpdate) RemoveWeaponStatIDs

func (mpu *MatchPlayerUpdate) RemoveWeaponStatIDs(ids ...int) *MatchPlayerUpdate

RemoveWeaponStatIDs removes the "weapon_stats" edge to Weapon entities by IDs.

func (*MatchPlayerUpdate) RemoveWeaponStats

func (mpu *MatchPlayerUpdate) RemoveWeaponStats(w ...*Weapon) *MatchPlayerUpdate

RemoveWeaponStats removes "weapon_stats" edges to Weapon entities.

func (*MatchPlayerUpdate) Save

func (mpu *MatchPlayerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MatchPlayerUpdate) SaveX

func (mpu *MatchPlayerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MatchPlayerUpdate) SetAssists

func (mpu *MatchPlayerUpdate) SetAssists(i int) *MatchPlayerUpdate

SetAssists sets the "assists" field.

func (*MatchPlayerUpdate) SetColor

SetColor sets the "color" field.

func (*MatchPlayerUpdate) SetCrosshair

func (mpu *MatchPlayerUpdate) SetCrosshair(s string) *MatchPlayerUpdate

SetCrosshair sets the "crosshair" field.

func (*MatchPlayerUpdate) SetDeaths

func (mpu *MatchPlayerUpdate) SetDeaths(i int) *MatchPlayerUpdate

SetDeaths sets the "deaths" field.

func (*MatchPlayerUpdate) SetDmgEnemy

func (mpu *MatchPlayerUpdate) SetDmgEnemy(u uint) *MatchPlayerUpdate

SetDmgEnemy sets the "dmg_enemy" field.

func (*MatchPlayerUpdate) SetDmgTeam

func (mpu *MatchPlayerUpdate) SetDmgTeam(u uint) *MatchPlayerUpdate

SetDmgTeam sets the "dmg_team" field.

func (*MatchPlayerUpdate) SetFlashAssists

func (mpu *MatchPlayerUpdate) SetFlashAssists(i int) *MatchPlayerUpdate

SetFlashAssists sets the "flash_assists" field.

func (*MatchPlayerUpdate) SetFlashDurationEnemy

func (mpu *MatchPlayerUpdate) SetFlashDurationEnemy(f float32) *MatchPlayerUpdate

SetFlashDurationEnemy sets the "flash_duration_enemy" field.

func (*MatchPlayerUpdate) SetFlashDurationSelf

func (mpu *MatchPlayerUpdate) SetFlashDurationSelf(f float32) *MatchPlayerUpdate

SetFlashDurationSelf sets the "flash_duration_self" field.

func (*MatchPlayerUpdate) SetFlashDurationTeam

func (mpu *MatchPlayerUpdate) SetFlashDurationTeam(f float32) *MatchPlayerUpdate

SetFlashDurationTeam sets the "flash_duration_team" field.

func (*MatchPlayerUpdate) SetFlashTotalEnemy

func (mpu *MatchPlayerUpdate) SetFlashTotalEnemy(u uint) *MatchPlayerUpdate

SetFlashTotalEnemy sets the "flash_total_enemy" field.

func (*MatchPlayerUpdate) SetFlashTotalSelf

func (mpu *MatchPlayerUpdate) SetFlashTotalSelf(u uint) *MatchPlayerUpdate

SetFlashTotalSelf sets the "flash_total_self" field.

func (*MatchPlayerUpdate) SetFlashTotalTeam

func (mpu *MatchPlayerUpdate) SetFlashTotalTeam(u uint) *MatchPlayerUpdate

SetFlashTotalTeam sets the "flash_total_team" field.

func (*MatchPlayerUpdate) SetHeadshot

func (mpu *MatchPlayerUpdate) SetHeadshot(i int) *MatchPlayerUpdate

SetHeadshot sets the "headshot" field.

func (*MatchPlayerUpdate) SetKast

func (mpu *MatchPlayerUpdate) SetKast(i int) *MatchPlayerUpdate

SetKast sets the "kast" field.

func (*MatchPlayerUpdate) SetKills

func (mpu *MatchPlayerUpdate) SetKills(i int) *MatchPlayerUpdate

SetKills sets the "kills" field.

func (*MatchPlayerUpdate) SetMatchStats

func (mpu *MatchPlayerUpdate) SetMatchStats(u uint64) *MatchPlayerUpdate

SetMatchStats sets the "match_stats" field.

func (*MatchPlayerUpdate) SetMatches

func (mpu *MatchPlayerUpdate) SetMatches(m *Match) *MatchPlayerUpdate

SetMatches sets the "matches" edge to the Match entity.

func (*MatchPlayerUpdate) SetMatchesID

func (mpu *MatchPlayerUpdate) SetMatchesID(id uint64) *MatchPlayerUpdate

SetMatchesID sets the "matches" edge to the Match entity by ID.

func (*MatchPlayerUpdate) SetMk2

func (mpu *MatchPlayerUpdate) SetMk2(u uint) *MatchPlayerUpdate

SetMk2 sets the "mk_2" field.

func (*MatchPlayerUpdate) SetMk3

func (mpu *MatchPlayerUpdate) SetMk3(u uint) *MatchPlayerUpdate

SetMk3 sets the "mk_3" field.

func (*MatchPlayerUpdate) SetMk4

func (mpu *MatchPlayerUpdate) SetMk4(u uint) *MatchPlayerUpdate

SetMk4 sets the "mk_4" field.

func (*MatchPlayerUpdate) SetMk5

func (mpu *MatchPlayerUpdate) SetMk5(u uint) *MatchPlayerUpdate

SetMk5 sets the "mk_5" field.

func (*MatchPlayerUpdate) SetMvp

func (mpu *MatchPlayerUpdate) SetMvp(u uint) *MatchPlayerUpdate

SetMvp sets the "mvp" field.

func (*MatchPlayerUpdate) SetNillableColor

func (mpu *MatchPlayerUpdate) SetNillableColor(m *matchplayer.Color) *MatchPlayerUpdate

SetNillableColor sets the "color" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableCrosshair

func (mpu *MatchPlayerUpdate) SetNillableCrosshair(s *string) *MatchPlayerUpdate

SetNillableCrosshair sets the "crosshair" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableDmgEnemy

func (mpu *MatchPlayerUpdate) SetNillableDmgEnemy(u *uint) *MatchPlayerUpdate

SetNillableDmgEnemy sets the "dmg_enemy" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableDmgTeam

func (mpu *MatchPlayerUpdate) SetNillableDmgTeam(u *uint) *MatchPlayerUpdate

SetNillableDmgTeam sets the "dmg_team" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashAssists

func (mpu *MatchPlayerUpdate) SetNillableFlashAssists(i *int) *MatchPlayerUpdate

SetNillableFlashAssists sets the "flash_assists" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashDurationEnemy

func (mpu *MatchPlayerUpdate) SetNillableFlashDurationEnemy(f *float32) *MatchPlayerUpdate

SetNillableFlashDurationEnemy sets the "flash_duration_enemy" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashDurationSelf

func (mpu *MatchPlayerUpdate) SetNillableFlashDurationSelf(f *float32) *MatchPlayerUpdate

SetNillableFlashDurationSelf sets the "flash_duration_self" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashDurationTeam

func (mpu *MatchPlayerUpdate) SetNillableFlashDurationTeam(f *float32) *MatchPlayerUpdate

SetNillableFlashDurationTeam sets the "flash_duration_team" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashTotalEnemy

func (mpu *MatchPlayerUpdate) SetNillableFlashTotalEnemy(u *uint) *MatchPlayerUpdate

SetNillableFlashTotalEnemy sets the "flash_total_enemy" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashTotalSelf

func (mpu *MatchPlayerUpdate) SetNillableFlashTotalSelf(u *uint) *MatchPlayerUpdate

SetNillableFlashTotalSelf sets the "flash_total_self" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableFlashTotalTeam

func (mpu *MatchPlayerUpdate) SetNillableFlashTotalTeam(u *uint) *MatchPlayerUpdate

SetNillableFlashTotalTeam sets the "flash_total_team" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableKast

func (mpu *MatchPlayerUpdate) SetNillableKast(i *int) *MatchPlayerUpdate

SetNillableKast sets the "kast" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMatchStats

func (mpu *MatchPlayerUpdate) SetNillableMatchStats(u *uint64) *MatchPlayerUpdate

SetNillableMatchStats sets the "match_stats" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMatchesID

func (mpu *MatchPlayerUpdate) SetNillableMatchesID(id *uint64) *MatchPlayerUpdate

SetNillableMatchesID sets the "matches" edge to the Match entity by ID if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMk2

func (mpu *MatchPlayerUpdate) SetNillableMk2(u *uint) *MatchPlayerUpdate

SetNillableMk2 sets the "mk_2" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMk3

func (mpu *MatchPlayerUpdate) SetNillableMk3(u *uint) *MatchPlayerUpdate

SetNillableMk3 sets the "mk_3" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMk4

func (mpu *MatchPlayerUpdate) SetNillableMk4(u *uint) *MatchPlayerUpdate

SetNillableMk4 sets the "mk_4" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableMk5

func (mpu *MatchPlayerUpdate) SetNillableMk5(u *uint) *MatchPlayerUpdate

SetNillableMk5 sets the "mk_5" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillablePlayerStats

func (mpu *MatchPlayerUpdate) SetNillablePlayerStats(u *uint64) *MatchPlayerUpdate

SetNillablePlayerStats sets the "player_stats" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillablePlayersID

func (mpu *MatchPlayerUpdate) SetNillablePlayersID(id *uint64) *MatchPlayerUpdate

SetNillablePlayersID sets the "players" edge to the Player entity by ID if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableRankNew

func (mpu *MatchPlayerUpdate) SetNillableRankNew(i *int) *MatchPlayerUpdate

SetNillableRankNew sets the "rank_new" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableRankOld

func (mpu *MatchPlayerUpdate) SetNillableRankOld(i *int) *MatchPlayerUpdate

SetNillableRankOld sets the "rank_old" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableUdDecoy

func (mpu *MatchPlayerUpdate) SetNillableUdDecoy(u *uint) *MatchPlayerUpdate

SetNillableUdDecoy sets the "ud_decoy" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableUdFlames

func (mpu *MatchPlayerUpdate) SetNillableUdFlames(u *uint) *MatchPlayerUpdate

SetNillableUdFlames sets the "ud_flames" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableUdFlash

func (mpu *MatchPlayerUpdate) SetNillableUdFlash(u *uint) *MatchPlayerUpdate

SetNillableUdFlash sets the "ud_flash" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableUdHe

func (mpu *MatchPlayerUpdate) SetNillableUdHe(u *uint) *MatchPlayerUpdate

SetNillableUdHe sets the "ud_he" field if the given value is not nil.

func (*MatchPlayerUpdate) SetNillableUdSmoke

func (mpu *MatchPlayerUpdate) SetNillableUdSmoke(u *uint) *MatchPlayerUpdate

SetNillableUdSmoke sets the "ud_smoke" field if the given value is not nil.

func (*MatchPlayerUpdate) SetPlayerStats

func (mpu *MatchPlayerUpdate) SetPlayerStats(u uint64) *MatchPlayerUpdate

SetPlayerStats sets the "player_stats" field.

func (*MatchPlayerUpdate) SetPlayers

func (mpu *MatchPlayerUpdate) SetPlayers(p *Player) *MatchPlayerUpdate

SetPlayers sets the "players" edge to the Player entity.

func (*MatchPlayerUpdate) SetPlayersID

func (mpu *MatchPlayerUpdate) SetPlayersID(id uint64) *MatchPlayerUpdate

SetPlayersID sets the "players" edge to the Player entity by ID.

func (*MatchPlayerUpdate) SetRankNew

func (mpu *MatchPlayerUpdate) SetRankNew(i int) *MatchPlayerUpdate

SetRankNew sets the "rank_new" field.

func (*MatchPlayerUpdate) SetRankOld

func (mpu *MatchPlayerUpdate) SetRankOld(i int) *MatchPlayerUpdate

SetRankOld sets the "rank_old" field.

func (*MatchPlayerUpdate) SetScore

func (mpu *MatchPlayerUpdate) SetScore(i int) *MatchPlayerUpdate

SetScore sets the "score" field.

func (*MatchPlayerUpdate) SetTeamID

func (mpu *MatchPlayerUpdate) SetTeamID(i int) *MatchPlayerUpdate

SetTeamID sets the "team_id" field.

func (*MatchPlayerUpdate) SetUdDecoy

func (mpu *MatchPlayerUpdate) SetUdDecoy(u uint) *MatchPlayerUpdate

SetUdDecoy sets the "ud_decoy" field.

func (*MatchPlayerUpdate) SetUdFlames

func (mpu *MatchPlayerUpdate) SetUdFlames(u uint) *MatchPlayerUpdate

SetUdFlames sets the "ud_flames" field.

func (*MatchPlayerUpdate) SetUdFlash

func (mpu *MatchPlayerUpdate) SetUdFlash(u uint) *MatchPlayerUpdate

SetUdFlash sets the "ud_flash" field.

func (*MatchPlayerUpdate) SetUdHe

func (mpu *MatchPlayerUpdate) SetUdHe(u uint) *MatchPlayerUpdate

SetUdHe sets the "ud_he" field.

func (*MatchPlayerUpdate) SetUdSmoke

func (mpu *MatchPlayerUpdate) SetUdSmoke(u uint) *MatchPlayerUpdate

SetUdSmoke sets the "ud_smoke" field.

func (*MatchPlayerUpdate) Where

Where appends a list predicates to the MatchPlayerUpdate builder.

type MatchPlayerUpdateOne

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

MatchPlayerUpdateOne is the builder for updating a single MatchPlayer entity.

func (*MatchPlayerUpdateOne) AddAssists

func (mpuo *MatchPlayerUpdateOne) AddAssists(i int) *MatchPlayerUpdateOne

AddAssists adds i to the "assists" field.

func (*MatchPlayerUpdateOne) AddDeaths

func (mpuo *MatchPlayerUpdateOne) AddDeaths(i int) *MatchPlayerUpdateOne

AddDeaths adds i to the "deaths" field.

func (*MatchPlayerUpdateOne) AddDmgEnemy

func (mpuo *MatchPlayerUpdateOne) AddDmgEnemy(u int) *MatchPlayerUpdateOne

AddDmgEnemy adds u to the "dmg_enemy" field.

func (*MatchPlayerUpdateOne) AddDmgTeam

func (mpuo *MatchPlayerUpdateOne) AddDmgTeam(u int) *MatchPlayerUpdateOne

AddDmgTeam adds u to the "dmg_team" field.

func (*MatchPlayerUpdateOne) AddFlashAssists

func (mpuo *MatchPlayerUpdateOne) AddFlashAssists(i int) *MatchPlayerUpdateOne

AddFlashAssists adds i to the "flash_assists" field.

func (*MatchPlayerUpdateOne) AddFlashDurationEnemy

func (mpuo *MatchPlayerUpdateOne) AddFlashDurationEnemy(f float32) *MatchPlayerUpdateOne

AddFlashDurationEnemy adds f to the "flash_duration_enemy" field.

func (*MatchPlayerUpdateOne) AddFlashDurationSelf

func (mpuo *MatchPlayerUpdateOne) AddFlashDurationSelf(f float32) *MatchPlayerUpdateOne

AddFlashDurationSelf adds f to the "flash_duration_self" field.

func (*MatchPlayerUpdateOne) AddFlashDurationTeam

func (mpuo *MatchPlayerUpdateOne) AddFlashDurationTeam(f float32) *MatchPlayerUpdateOne

AddFlashDurationTeam adds f to the "flash_duration_team" field.

func (*MatchPlayerUpdateOne) AddFlashTotalEnemy

func (mpuo *MatchPlayerUpdateOne) AddFlashTotalEnemy(u int) *MatchPlayerUpdateOne

AddFlashTotalEnemy adds u to the "flash_total_enemy" field.

func (*MatchPlayerUpdateOne) AddFlashTotalSelf

func (mpuo *MatchPlayerUpdateOne) AddFlashTotalSelf(u int) *MatchPlayerUpdateOne

AddFlashTotalSelf adds u to the "flash_total_self" field.

func (*MatchPlayerUpdateOne) AddFlashTotalTeam

func (mpuo *MatchPlayerUpdateOne) AddFlashTotalTeam(u int) *MatchPlayerUpdateOne

AddFlashTotalTeam adds u to the "flash_total_team" field.

func (*MatchPlayerUpdateOne) AddHeadshot

func (mpuo *MatchPlayerUpdateOne) AddHeadshot(i int) *MatchPlayerUpdateOne

AddHeadshot adds i to the "headshot" field.

func (*MatchPlayerUpdateOne) AddKast

func (mpuo *MatchPlayerUpdateOne) AddKast(i int) *MatchPlayerUpdateOne

AddKast adds i to the "kast" field.

func (*MatchPlayerUpdateOne) AddKills

func (mpuo *MatchPlayerUpdateOne) AddKills(i int) *MatchPlayerUpdateOne

AddKills adds i to the "kills" field.

func (*MatchPlayerUpdateOne) AddMessageIDs

func (mpuo *MatchPlayerUpdateOne) AddMessageIDs(ids ...int) *MatchPlayerUpdateOne

AddMessageIDs adds the "messages" edge to the Messages entity by IDs.

func (*MatchPlayerUpdateOne) AddMessages

func (mpuo *MatchPlayerUpdateOne) AddMessages(m ...*Messages) *MatchPlayerUpdateOne

AddMessages adds the "messages" edges to the Messages entity.

func (*MatchPlayerUpdateOne) AddMk2

AddMk2 adds u to the "mk_2" field.

func (*MatchPlayerUpdateOne) AddMk3

AddMk3 adds u to the "mk_3" field.

func (*MatchPlayerUpdateOne) AddMk4

AddMk4 adds u to the "mk_4" field.

func (*MatchPlayerUpdateOne) AddMk5

AddMk5 adds u to the "mk_5" field.

func (*MatchPlayerUpdateOne) AddMvp

AddMvp adds u to the "mvp" field.

func (*MatchPlayerUpdateOne) AddRankNew

func (mpuo *MatchPlayerUpdateOne) AddRankNew(i int) *MatchPlayerUpdateOne

AddRankNew adds i to the "rank_new" field.

func (*MatchPlayerUpdateOne) AddRankOld

func (mpuo *MatchPlayerUpdateOne) AddRankOld(i int) *MatchPlayerUpdateOne

AddRankOld adds i to the "rank_old" field.

func (*MatchPlayerUpdateOne) AddRoundStatIDs

func (mpuo *MatchPlayerUpdateOne) AddRoundStatIDs(ids ...int) *MatchPlayerUpdateOne

AddRoundStatIDs adds the "round_stats" edge to the RoundStats entity by IDs.

func (*MatchPlayerUpdateOne) AddRoundStats

func (mpuo *MatchPlayerUpdateOne) AddRoundStats(r ...*RoundStats) *MatchPlayerUpdateOne

AddRoundStats adds the "round_stats" edges to the RoundStats entity.

func (*MatchPlayerUpdateOne) AddScore

func (mpuo *MatchPlayerUpdateOne) AddScore(i int) *MatchPlayerUpdateOne

AddScore adds i to the "score" field.

func (*MatchPlayerUpdateOne) AddSpray

func (mpuo *MatchPlayerUpdateOne) AddSpray(s ...*Spray) *MatchPlayerUpdateOne

AddSpray adds the "spray" edges to the Spray entity.

func (*MatchPlayerUpdateOne) AddSprayIDs

func (mpuo *MatchPlayerUpdateOne) AddSprayIDs(ids ...int) *MatchPlayerUpdateOne

AddSprayIDs adds the "spray" edge to the Spray entity by IDs.

func (*MatchPlayerUpdateOne) AddTeamID

func (mpuo *MatchPlayerUpdateOne) AddTeamID(i int) *MatchPlayerUpdateOne

AddTeamID adds i to the "team_id" field.

func (*MatchPlayerUpdateOne) AddUdDecoy

func (mpuo *MatchPlayerUpdateOne) AddUdDecoy(u int) *MatchPlayerUpdateOne

AddUdDecoy adds u to the "ud_decoy" field.

func (*MatchPlayerUpdateOne) AddUdFlames

func (mpuo *MatchPlayerUpdateOne) AddUdFlames(u int) *MatchPlayerUpdateOne

AddUdFlames adds u to the "ud_flames" field.

func (*MatchPlayerUpdateOne) AddUdFlash

func (mpuo *MatchPlayerUpdateOne) AddUdFlash(u int) *MatchPlayerUpdateOne

AddUdFlash adds u to the "ud_flash" field.

func (*MatchPlayerUpdateOne) AddUdHe

func (mpuo *MatchPlayerUpdateOne) AddUdHe(u int) *MatchPlayerUpdateOne

AddUdHe adds u to the "ud_he" field.

func (*MatchPlayerUpdateOne) AddUdSmoke

func (mpuo *MatchPlayerUpdateOne) AddUdSmoke(u int) *MatchPlayerUpdateOne

AddUdSmoke adds u to the "ud_smoke" field.

func (*MatchPlayerUpdateOne) AddWeaponStatIDs

func (mpuo *MatchPlayerUpdateOne) AddWeaponStatIDs(ids ...int) *MatchPlayerUpdateOne

AddWeaponStatIDs adds the "weapon_stats" edge to the Weapon entity by IDs.

func (*MatchPlayerUpdateOne) AddWeaponStats

func (mpuo *MatchPlayerUpdateOne) AddWeaponStats(w ...*Weapon) *MatchPlayerUpdateOne

AddWeaponStats adds the "weapon_stats" edges to the Weapon entity.

func (*MatchPlayerUpdateOne) ClearColor

func (mpuo *MatchPlayerUpdateOne) ClearColor() *MatchPlayerUpdateOne

ClearColor clears the value of the "color" field.

func (*MatchPlayerUpdateOne) ClearCrosshair

func (mpuo *MatchPlayerUpdateOne) ClearCrosshair() *MatchPlayerUpdateOne

ClearCrosshair clears the value of the "crosshair" field.

func (*MatchPlayerUpdateOne) ClearDmgEnemy

func (mpuo *MatchPlayerUpdateOne) ClearDmgEnemy() *MatchPlayerUpdateOne

ClearDmgEnemy clears the value of the "dmg_enemy" field.

func (*MatchPlayerUpdateOne) ClearDmgTeam

func (mpuo *MatchPlayerUpdateOne) ClearDmgTeam() *MatchPlayerUpdateOne

ClearDmgTeam clears the value of the "dmg_team" field.

func (*MatchPlayerUpdateOne) ClearFlashAssists

func (mpuo *MatchPlayerUpdateOne) ClearFlashAssists() *MatchPlayerUpdateOne

ClearFlashAssists clears the value of the "flash_assists" field.

func (*MatchPlayerUpdateOne) ClearFlashDurationEnemy

func (mpuo *MatchPlayerUpdateOne) ClearFlashDurationEnemy() *MatchPlayerUpdateOne

ClearFlashDurationEnemy clears the value of the "flash_duration_enemy" field.

func (*MatchPlayerUpdateOne) ClearFlashDurationSelf

func (mpuo *MatchPlayerUpdateOne) ClearFlashDurationSelf() *MatchPlayerUpdateOne

ClearFlashDurationSelf clears the value of the "flash_duration_self" field.

func (*MatchPlayerUpdateOne) ClearFlashDurationTeam

func (mpuo *MatchPlayerUpdateOne) ClearFlashDurationTeam() *MatchPlayerUpdateOne

ClearFlashDurationTeam clears the value of the "flash_duration_team" field.

func (*MatchPlayerUpdateOne) ClearFlashTotalEnemy

func (mpuo *MatchPlayerUpdateOne) ClearFlashTotalEnemy() *MatchPlayerUpdateOne

ClearFlashTotalEnemy clears the value of the "flash_total_enemy" field.

func (*MatchPlayerUpdateOne) ClearFlashTotalSelf

func (mpuo *MatchPlayerUpdateOne) ClearFlashTotalSelf() *MatchPlayerUpdateOne

ClearFlashTotalSelf clears the value of the "flash_total_self" field.

func (*MatchPlayerUpdateOne) ClearFlashTotalTeam

func (mpuo *MatchPlayerUpdateOne) ClearFlashTotalTeam() *MatchPlayerUpdateOne

ClearFlashTotalTeam clears the value of the "flash_total_team" field.

func (*MatchPlayerUpdateOne) ClearKast

func (mpuo *MatchPlayerUpdateOne) ClearKast() *MatchPlayerUpdateOne

ClearKast clears the value of the "kast" field.

func (*MatchPlayerUpdateOne) ClearMatchStats

func (mpuo *MatchPlayerUpdateOne) ClearMatchStats() *MatchPlayerUpdateOne

ClearMatchStats clears the value of the "match_stats" field.

func (*MatchPlayerUpdateOne) ClearMatches

func (mpuo *MatchPlayerUpdateOne) ClearMatches() *MatchPlayerUpdateOne

ClearMatches clears the "matches" edge to the Match entity.

func (*MatchPlayerUpdateOne) ClearMessages

func (mpuo *MatchPlayerUpdateOne) ClearMessages() *MatchPlayerUpdateOne

ClearMessages clears all "messages" edges to the Messages entity.

func (*MatchPlayerUpdateOne) ClearMk2

func (mpuo *MatchPlayerUpdateOne) ClearMk2() *MatchPlayerUpdateOne

ClearMk2 clears the value of the "mk_2" field.

func (*MatchPlayerUpdateOne) ClearMk3

func (mpuo *MatchPlayerUpdateOne) ClearMk3() *MatchPlayerUpdateOne

ClearMk3 clears the value of the "mk_3" field.

func (*MatchPlayerUpdateOne) ClearMk4

func (mpuo *MatchPlayerUpdateOne) ClearMk4() *MatchPlayerUpdateOne

ClearMk4 clears the value of the "mk_4" field.

func (*MatchPlayerUpdateOne) ClearMk5

func (mpuo *MatchPlayerUpdateOne) ClearMk5() *MatchPlayerUpdateOne

ClearMk5 clears the value of the "mk_5" field.

func (*MatchPlayerUpdateOne) ClearPlayerStats

func (mpuo *MatchPlayerUpdateOne) ClearPlayerStats() *MatchPlayerUpdateOne

ClearPlayerStats clears the value of the "player_stats" field.

func (*MatchPlayerUpdateOne) ClearPlayers

func (mpuo *MatchPlayerUpdateOne) ClearPlayers() *MatchPlayerUpdateOne

ClearPlayers clears the "players" edge to the Player entity.

func (*MatchPlayerUpdateOne) ClearRankNew

func (mpuo *MatchPlayerUpdateOne) ClearRankNew() *MatchPlayerUpdateOne

ClearRankNew clears the value of the "rank_new" field.

func (*MatchPlayerUpdateOne) ClearRankOld

func (mpuo *MatchPlayerUpdateOne) ClearRankOld() *MatchPlayerUpdateOne

ClearRankOld clears the value of the "rank_old" field.

func (*MatchPlayerUpdateOne) ClearRoundStats

func (mpuo *MatchPlayerUpdateOne) ClearRoundStats() *MatchPlayerUpdateOne

ClearRoundStats clears all "round_stats" edges to the RoundStats entity.

func (*MatchPlayerUpdateOne) ClearSpray

func (mpuo *MatchPlayerUpdateOne) ClearSpray() *MatchPlayerUpdateOne

ClearSpray clears all "spray" edges to the Spray entity.

func (*MatchPlayerUpdateOne) ClearUdDecoy

func (mpuo *MatchPlayerUpdateOne) ClearUdDecoy() *MatchPlayerUpdateOne

ClearUdDecoy clears the value of the "ud_decoy" field.

func (*MatchPlayerUpdateOne) ClearUdFlames

func (mpuo *MatchPlayerUpdateOne) ClearUdFlames() *MatchPlayerUpdateOne

ClearUdFlames clears the value of the "ud_flames" field.

func (*MatchPlayerUpdateOne) ClearUdFlash

func (mpuo *MatchPlayerUpdateOne) ClearUdFlash() *MatchPlayerUpdateOne

ClearUdFlash clears the value of the "ud_flash" field.

func (*MatchPlayerUpdateOne) ClearUdHe

func (mpuo *MatchPlayerUpdateOne) ClearUdHe() *MatchPlayerUpdateOne

ClearUdHe clears the value of the "ud_he" field.

func (*MatchPlayerUpdateOne) ClearUdSmoke

func (mpuo *MatchPlayerUpdateOne) ClearUdSmoke() *MatchPlayerUpdateOne

ClearUdSmoke clears the value of the "ud_smoke" field.

func (*MatchPlayerUpdateOne) ClearWeaponStats

func (mpuo *MatchPlayerUpdateOne) ClearWeaponStats() *MatchPlayerUpdateOne

ClearWeaponStats clears all "weapon_stats" edges to the Weapon entity.

func (*MatchPlayerUpdateOne) Exec

func (mpuo *MatchPlayerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MatchPlayerUpdateOne) ExecX

func (mpuo *MatchPlayerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchPlayerUpdateOne) Modify

func (mpuo *MatchPlayerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchPlayerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MatchPlayerUpdateOne) Mutation

func (mpuo *MatchPlayerUpdateOne) Mutation() *MatchPlayerMutation

Mutation returns the MatchPlayerMutation object of the builder.

func (*MatchPlayerUpdateOne) RemoveMessageIDs

func (mpuo *MatchPlayerUpdateOne) RemoveMessageIDs(ids ...int) *MatchPlayerUpdateOne

RemoveMessageIDs removes the "messages" edge to Messages entities by IDs.

func (*MatchPlayerUpdateOne) RemoveMessages

func (mpuo *MatchPlayerUpdateOne) RemoveMessages(m ...*Messages) *MatchPlayerUpdateOne

RemoveMessages removes "messages" edges to Messages entities.

func (*MatchPlayerUpdateOne) RemoveRoundStatIDs

func (mpuo *MatchPlayerUpdateOne) RemoveRoundStatIDs(ids ...int) *MatchPlayerUpdateOne

RemoveRoundStatIDs removes the "round_stats" edge to RoundStats entities by IDs.

func (*MatchPlayerUpdateOne) RemoveRoundStats

func (mpuo *MatchPlayerUpdateOne) RemoveRoundStats(r ...*RoundStats) *MatchPlayerUpdateOne

RemoveRoundStats removes "round_stats" edges to RoundStats entities.

func (*MatchPlayerUpdateOne) RemoveSpray

func (mpuo *MatchPlayerUpdateOne) RemoveSpray(s ...*Spray) *MatchPlayerUpdateOne

RemoveSpray removes "spray" edges to Spray entities.

func (*MatchPlayerUpdateOne) RemoveSprayIDs

func (mpuo *MatchPlayerUpdateOne) RemoveSprayIDs(ids ...int) *MatchPlayerUpdateOne

RemoveSprayIDs removes the "spray" edge to Spray entities by IDs.

func (*MatchPlayerUpdateOne) RemoveWeaponStatIDs

func (mpuo *MatchPlayerUpdateOne) RemoveWeaponStatIDs(ids ...int) *MatchPlayerUpdateOne

RemoveWeaponStatIDs removes the "weapon_stats" edge to Weapon entities by IDs.

func (*MatchPlayerUpdateOne) RemoveWeaponStats

func (mpuo *MatchPlayerUpdateOne) RemoveWeaponStats(w ...*Weapon) *MatchPlayerUpdateOne

RemoveWeaponStats removes "weapon_stats" edges to Weapon entities.

func (*MatchPlayerUpdateOne) Save

Save executes the query and returns the updated MatchPlayer entity.

func (*MatchPlayerUpdateOne) SaveX

func (mpuo *MatchPlayerUpdateOne) SaveX(ctx context.Context) *MatchPlayer

SaveX is like Save, but panics if an error occurs.

func (*MatchPlayerUpdateOne) Select

func (mpuo *MatchPlayerUpdateOne) Select(field string, fields ...string) *MatchPlayerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MatchPlayerUpdateOne) SetAssists

func (mpuo *MatchPlayerUpdateOne) SetAssists(i int) *MatchPlayerUpdateOne

SetAssists sets the "assists" field.

func (*MatchPlayerUpdateOne) SetColor

SetColor sets the "color" field.

func (*MatchPlayerUpdateOne) SetCrosshair

func (mpuo *MatchPlayerUpdateOne) SetCrosshair(s string) *MatchPlayerUpdateOne

SetCrosshair sets the "crosshair" field.

func (*MatchPlayerUpdateOne) SetDeaths

func (mpuo *MatchPlayerUpdateOne) SetDeaths(i int) *MatchPlayerUpdateOne

SetDeaths sets the "deaths" field.

func (*MatchPlayerUpdateOne) SetDmgEnemy

func (mpuo *MatchPlayerUpdateOne) SetDmgEnemy(u uint) *MatchPlayerUpdateOne

SetDmgEnemy sets the "dmg_enemy" field.

func (*MatchPlayerUpdateOne) SetDmgTeam

func (mpuo *MatchPlayerUpdateOne) SetDmgTeam(u uint) *MatchPlayerUpdateOne

SetDmgTeam sets the "dmg_team" field.

func (*MatchPlayerUpdateOne) SetFlashAssists

func (mpuo *MatchPlayerUpdateOne) SetFlashAssists(i int) *MatchPlayerUpdateOne

SetFlashAssists sets the "flash_assists" field.

func (*MatchPlayerUpdateOne) SetFlashDurationEnemy

func (mpuo *MatchPlayerUpdateOne) SetFlashDurationEnemy(f float32) *MatchPlayerUpdateOne

SetFlashDurationEnemy sets the "flash_duration_enemy" field.

func (*MatchPlayerUpdateOne) SetFlashDurationSelf

func (mpuo *MatchPlayerUpdateOne) SetFlashDurationSelf(f float32) *MatchPlayerUpdateOne

SetFlashDurationSelf sets the "flash_duration_self" field.

func (*MatchPlayerUpdateOne) SetFlashDurationTeam

func (mpuo *MatchPlayerUpdateOne) SetFlashDurationTeam(f float32) *MatchPlayerUpdateOne

SetFlashDurationTeam sets the "flash_duration_team" field.

func (*MatchPlayerUpdateOne) SetFlashTotalEnemy

func (mpuo *MatchPlayerUpdateOne) SetFlashTotalEnemy(u uint) *MatchPlayerUpdateOne

SetFlashTotalEnemy sets the "flash_total_enemy" field.

func (*MatchPlayerUpdateOne) SetFlashTotalSelf

func (mpuo *MatchPlayerUpdateOne) SetFlashTotalSelf(u uint) *MatchPlayerUpdateOne

SetFlashTotalSelf sets the "flash_total_self" field.

func (*MatchPlayerUpdateOne) SetFlashTotalTeam

func (mpuo *MatchPlayerUpdateOne) SetFlashTotalTeam(u uint) *MatchPlayerUpdateOne

SetFlashTotalTeam sets the "flash_total_team" field.

func (*MatchPlayerUpdateOne) SetHeadshot

func (mpuo *MatchPlayerUpdateOne) SetHeadshot(i int) *MatchPlayerUpdateOne

SetHeadshot sets the "headshot" field.

func (*MatchPlayerUpdateOne) SetKast

func (mpuo *MatchPlayerUpdateOne) SetKast(i int) *MatchPlayerUpdateOne

SetKast sets the "kast" field.

func (*MatchPlayerUpdateOne) SetKills

func (mpuo *MatchPlayerUpdateOne) SetKills(i int) *MatchPlayerUpdateOne

SetKills sets the "kills" field.

func (*MatchPlayerUpdateOne) SetMatchStats

func (mpuo *MatchPlayerUpdateOne) SetMatchStats(u uint64) *MatchPlayerUpdateOne

SetMatchStats sets the "match_stats" field.

func (*MatchPlayerUpdateOne) SetMatches

func (mpuo *MatchPlayerUpdateOne) SetMatches(m *Match) *MatchPlayerUpdateOne

SetMatches sets the "matches" edge to the Match entity.

func (*MatchPlayerUpdateOne) SetMatchesID

func (mpuo *MatchPlayerUpdateOne) SetMatchesID(id uint64) *MatchPlayerUpdateOne

SetMatchesID sets the "matches" edge to the Match entity by ID.

func (*MatchPlayerUpdateOne) SetMk2

SetMk2 sets the "mk_2" field.

func (*MatchPlayerUpdateOne) SetMk3

SetMk3 sets the "mk_3" field.

func (*MatchPlayerUpdateOne) SetMk4

SetMk4 sets the "mk_4" field.

func (*MatchPlayerUpdateOne) SetMk5

SetMk5 sets the "mk_5" field.

func (*MatchPlayerUpdateOne) SetMvp

SetMvp sets the "mvp" field.

func (*MatchPlayerUpdateOne) SetNillableColor

func (mpuo *MatchPlayerUpdateOne) SetNillableColor(m *matchplayer.Color) *MatchPlayerUpdateOne

SetNillableColor sets the "color" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableCrosshair

func (mpuo *MatchPlayerUpdateOne) SetNillableCrosshair(s *string) *MatchPlayerUpdateOne

SetNillableCrosshair sets the "crosshair" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableDmgEnemy

func (mpuo *MatchPlayerUpdateOne) SetNillableDmgEnemy(u *uint) *MatchPlayerUpdateOne

SetNillableDmgEnemy sets the "dmg_enemy" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableDmgTeam

func (mpuo *MatchPlayerUpdateOne) SetNillableDmgTeam(u *uint) *MatchPlayerUpdateOne

SetNillableDmgTeam sets the "dmg_team" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashAssists

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashAssists(i *int) *MatchPlayerUpdateOne

SetNillableFlashAssists sets the "flash_assists" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashDurationEnemy

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashDurationEnemy(f *float32) *MatchPlayerUpdateOne

SetNillableFlashDurationEnemy sets the "flash_duration_enemy" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashDurationSelf

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashDurationSelf(f *float32) *MatchPlayerUpdateOne

SetNillableFlashDurationSelf sets the "flash_duration_self" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashDurationTeam

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashDurationTeam(f *float32) *MatchPlayerUpdateOne

SetNillableFlashDurationTeam sets the "flash_duration_team" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashTotalEnemy

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashTotalEnemy(u *uint) *MatchPlayerUpdateOne

SetNillableFlashTotalEnemy sets the "flash_total_enemy" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashTotalSelf

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashTotalSelf(u *uint) *MatchPlayerUpdateOne

SetNillableFlashTotalSelf sets the "flash_total_self" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableFlashTotalTeam

func (mpuo *MatchPlayerUpdateOne) SetNillableFlashTotalTeam(u *uint) *MatchPlayerUpdateOne

SetNillableFlashTotalTeam sets the "flash_total_team" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableKast

func (mpuo *MatchPlayerUpdateOne) SetNillableKast(i *int) *MatchPlayerUpdateOne

SetNillableKast sets the "kast" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMatchStats

func (mpuo *MatchPlayerUpdateOne) SetNillableMatchStats(u *uint64) *MatchPlayerUpdateOne

SetNillableMatchStats sets the "match_stats" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMatchesID

func (mpuo *MatchPlayerUpdateOne) SetNillableMatchesID(id *uint64) *MatchPlayerUpdateOne

SetNillableMatchesID sets the "matches" edge to the Match entity by ID if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMk2

func (mpuo *MatchPlayerUpdateOne) SetNillableMk2(u *uint) *MatchPlayerUpdateOne

SetNillableMk2 sets the "mk_2" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMk3

func (mpuo *MatchPlayerUpdateOne) SetNillableMk3(u *uint) *MatchPlayerUpdateOne

SetNillableMk3 sets the "mk_3" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMk4

func (mpuo *MatchPlayerUpdateOne) SetNillableMk4(u *uint) *MatchPlayerUpdateOne

SetNillableMk4 sets the "mk_4" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableMk5

func (mpuo *MatchPlayerUpdateOne) SetNillableMk5(u *uint) *MatchPlayerUpdateOne

SetNillableMk5 sets the "mk_5" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillablePlayerStats

func (mpuo *MatchPlayerUpdateOne) SetNillablePlayerStats(u *uint64) *MatchPlayerUpdateOne

SetNillablePlayerStats sets the "player_stats" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillablePlayersID

func (mpuo *MatchPlayerUpdateOne) SetNillablePlayersID(id *uint64) *MatchPlayerUpdateOne

SetNillablePlayersID sets the "players" edge to the Player entity by ID if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableRankNew

func (mpuo *MatchPlayerUpdateOne) SetNillableRankNew(i *int) *MatchPlayerUpdateOne

SetNillableRankNew sets the "rank_new" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableRankOld

func (mpuo *MatchPlayerUpdateOne) SetNillableRankOld(i *int) *MatchPlayerUpdateOne

SetNillableRankOld sets the "rank_old" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableUdDecoy

func (mpuo *MatchPlayerUpdateOne) SetNillableUdDecoy(u *uint) *MatchPlayerUpdateOne

SetNillableUdDecoy sets the "ud_decoy" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableUdFlames

func (mpuo *MatchPlayerUpdateOne) SetNillableUdFlames(u *uint) *MatchPlayerUpdateOne

SetNillableUdFlames sets the "ud_flames" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableUdFlash

func (mpuo *MatchPlayerUpdateOne) SetNillableUdFlash(u *uint) *MatchPlayerUpdateOne

SetNillableUdFlash sets the "ud_flash" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableUdHe

func (mpuo *MatchPlayerUpdateOne) SetNillableUdHe(u *uint) *MatchPlayerUpdateOne

SetNillableUdHe sets the "ud_he" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetNillableUdSmoke

func (mpuo *MatchPlayerUpdateOne) SetNillableUdSmoke(u *uint) *MatchPlayerUpdateOne

SetNillableUdSmoke sets the "ud_smoke" field if the given value is not nil.

func (*MatchPlayerUpdateOne) SetPlayerStats

func (mpuo *MatchPlayerUpdateOne) SetPlayerStats(u uint64) *MatchPlayerUpdateOne

SetPlayerStats sets the "player_stats" field.

func (*MatchPlayerUpdateOne) SetPlayers

func (mpuo *MatchPlayerUpdateOne) SetPlayers(p *Player) *MatchPlayerUpdateOne

SetPlayers sets the "players" edge to the Player entity.

func (*MatchPlayerUpdateOne) SetPlayersID

func (mpuo *MatchPlayerUpdateOne) SetPlayersID(id uint64) *MatchPlayerUpdateOne

SetPlayersID sets the "players" edge to the Player entity by ID.

func (*MatchPlayerUpdateOne) SetRankNew

func (mpuo *MatchPlayerUpdateOne) SetRankNew(i int) *MatchPlayerUpdateOne

SetRankNew sets the "rank_new" field.

func (*MatchPlayerUpdateOne) SetRankOld

func (mpuo *MatchPlayerUpdateOne) SetRankOld(i int) *MatchPlayerUpdateOne

SetRankOld sets the "rank_old" field.

func (*MatchPlayerUpdateOne) SetScore

func (mpuo *MatchPlayerUpdateOne) SetScore(i int) *MatchPlayerUpdateOne

SetScore sets the "score" field.

func (*MatchPlayerUpdateOne) SetTeamID

func (mpuo *MatchPlayerUpdateOne) SetTeamID(i int) *MatchPlayerUpdateOne

SetTeamID sets the "team_id" field.

func (*MatchPlayerUpdateOne) SetUdDecoy

func (mpuo *MatchPlayerUpdateOne) SetUdDecoy(u uint) *MatchPlayerUpdateOne

SetUdDecoy sets the "ud_decoy" field.

func (*MatchPlayerUpdateOne) SetUdFlames

func (mpuo *MatchPlayerUpdateOne) SetUdFlames(u uint) *MatchPlayerUpdateOne

SetUdFlames sets the "ud_flames" field.

func (*MatchPlayerUpdateOne) SetUdFlash

func (mpuo *MatchPlayerUpdateOne) SetUdFlash(u uint) *MatchPlayerUpdateOne

SetUdFlash sets the "ud_flash" field.

func (*MatchPlayerUpdateOne) SetUdHe

SetUdHe sets the "ud_he" field.

func (*MatchPlayerUpdateOne) SetUdSmoke

func (mpuo *MatchPlayerUpdateOne) SetUdSmoke(u uint) *MatchPlayerUpdateOne

SetUdSmoke sets the "ud_smoke" field.

type MatchPlayers

type MatchPlayers []*MatchPlayer

MatchPlayers is a parsable slice of MatchPlayer.

type MatchQuery

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

MatchQuery is the builder for querying Match entities.

func (*MatchQuery) All

func (mq *MatchQuery) All(ctx context.Context) ([]*Match, error)

All executes the query and returns a list of Matches.

func (*MatchQuery) AllX

func (mq *MatchQuery) AllX(ctx context.Context) []*Match

AllX is like All, but panics if an error occurs.

func (*MatchQuery) Clone

func (mq *MatchQuery) Clone() *MatchQuery

Clone returns a duplicate of the MatchQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MatchQuery) Count

func (mq *MatchQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MatchQuery) CountX

func (mq *MatchQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MatchQuery) Exist

func (mq *MatchQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MatchQuery) ExistX

func (mq *MatchQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MatchQuery) First

func (mq *MatchQuery) First(ctx context.Context) (*Match, error)

First returns the first Match entity from the query. Returns a *NotFoundError when no Match was found.

func (*MatchQuery) FirstID

func (mq *MatchQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first Match ID from the query. Returns a *NotFoundError when no Match ID was found.

func (*MatchQuery) FirstIDX

func (mq *MatchQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*MatchQuery) FirstX

func (mq *MatchQuery) FirstX(ctx context.Context) *Match

FirstX is like First, but panics if an error occurs.

func (*MatchQuery) GroupBy

func (mq *MatchQuery) GroupBy(field string, fields ...string) *MatchGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ShareCode string `json:"share_code,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Match.Query().
	GroupBy(match.FieldShareCode).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MatchQuery) IDs

func (mq *MatchQuery) IDs(ctx context.Context) ([]uint64, error)

IDs executes the query and returns a list of Match IDs.

func (*MatchQuery) IDsX

func (mq *MatchQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*MatchQuery) Limit

func (mq *MatchQuery) Limit(limit int) *MatchQuery

Limit adds a limit step to the query.

func (*MatchQuery) Modify

func (mq *MatchQuery) Modify(modifiers ...func(s *sql.Selector)) *MatchSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MatchQuery) Offset

func (mq *MatchQuery) Offset(offset int) *MatchQuery

Offset adds an offset step to the query.

func (*MatchQuery) Only

func (mq *MatchQuery) Only(ctx context.Context) (*Match, error)

Only returns a single Match entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Match entity is found. Returns a *NotFoundError when no Match entities are found.

func (*MatchQuery) OnlyID

func (mq *MatchQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only Match ID in the query. Returns a *NotSingularError when more than one Match ID is found. Returns a *NotFoundError when no entities are found.

func (*MatchQuery) OnlyIDX

func (mq *MatchQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MatchQuery) OnlyX

func (mq *MatchQuery) OnlyX(ctx context.Context) *Match

OnlyX is like Only, but panics if an error occurs.

func (*MatchQuery) Order

func (mq *MatchQuery) Order(o ...OrderFunc) *MatchQuery

Order adds an order step to the query.

func (*MatchQuery) QueryPlayers

func (mq *MatchQuery) QueryPlayers() *PlayerQuery

QueryPlayers chains the current query on the "players" edge.

func (*MatchQuery) QueryStats

func (mq *MatchQuery) QueryStats() *MatchPlayerQuery

QueryStats chains the current query on the "stats" edge.

func (*MatchQuery) Select

func (mq *MatchQuery) Select(fields ...string) *MatchSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ShareCode string `json:"share_code,omitempty"`
}

client.Match.Query().
	Select(match.FieldShareCode).
	Scan(ctx, &v)

func (*MatchQuery) Unique

func (mq *MatchQuery) Unique(unique bool) *MatchQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MatchQuery) Where

func (mq *MatchQuery) Where(ps ...predicate.Match) *MatchQuery

Where adds a new predicate for the MatchQuery builder.

func (*MatchQuery) WithPlayers

func (mq *MatchQuery) WithPlayers(opts ...func(*PlayerQuery)) *MatchQuery

WithPlayers tells the query-builder to eager-load the nodes that are connected to the "players" edge. The optional arguments are used to configure the query builder of the edge.

func (*MatchQuery) WithStats

func (mq *MatchQuery) WithStats(opts ...func(*MatchPlayerQuery)) *MatchQuery

WithStats tells the query-builder to eager-load the nodes that are connected to the "stats" edge. The optional arguments are used to configure the query builder of the edge.

type MatchSelect

type MatchSelect struct {
	*MatchQuery
	// contains filtered or unexported fields
}

MatchSelect is the builder for selecting fields of Match entities.

func (*MatchSelect) Bool

func (s *MatchSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MatchSelect) BoolX

func (s *MatchSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MatchSelect) Bools

func (s *MatchSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MatchSelect) BoolsX

func (s *MatchSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MatchSelect) Float64

func (s *MatchSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MatchSelect) Float64X

func (s *MatchSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MatchSelect) Float64s

func (s *MatchSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MatchSelect) Float64sX

func (s *MatchSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MatchSelect) Int

func (s *MatchSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MatchSelect) IntX

func (s *MatchSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MatchSelect) Ints

func (s *MatchSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MatchSelect) IntsX

func (s *MatchSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MatchSelect) Modify

func (ms *MatchSelect) Modify(modifiers ...func(s *sql.Selector)) *MatchSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MatchSelect) Scan

func (ms *MatchSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*MatchSelect) ScanX

func (s *MatchSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MatchSelect) String

func (s *MatchSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MatchSelect) StringX

func (s *MatchSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MatchSelect) Strings

func (s *MatchSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MatchSelect) StringsX

func (s *MatchSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MatchUpdate

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

MatchUpdate is the builder for updating Match entities.

func (*MatchUpdate) AddDuration

func (mu *MatchUpdate) AddDuration(i int) *MatchUpdate

AddDuration adds i to the "duration" field.

func (*MatchUpdate) AddMatchResult

func (mu *MatchUpdate) AddMatchResult(i int) *MatchUpdate

AddMatchResult adds i to the "match_result" field.

func (*MatchUpdate) AddMaxRounds

func (mu *MatchUpdate) AddMaxRounds(i int) *MatchUpdate

AddMaxRounds adds i to the "max_rounds" field.

func (*MatchUpdate) AddPlayerIDs

func (mu *MatchUpdate) AddPlayerIDs(ids ...uint64) *MatchUpdate

AddPlayerIDs adds the "players" edge to the Player entity by IDs.

func (*MatchUpdate) AddPlayers

func (mu *MatchUpdate) AddPlayers(p ...*Player) *MatchUpdate

AddPlayers adds the "players" edges to the Player entity.

func (*MatchUpdate) AddScoreTeamA

func (mu *MatchUpdate) AddScoreTeamA(i int) *MatchUpdate

AddScoreTeamA adds i to the "score_team_a" field.

func (*MatchUpdate) AddScoreTeamB

func (mu *MatchUpdate) AddScoreTeamB(i int) *MatchUpdate

AddScoreTeamB adds i to the "score_team_b" field.

func (*MatchUpdate) AddStatIDs

func (mu *MatchUpdate) AddStatIDs(ids ...int) *MatchUpdate

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*MatchUpdate) AddStats

func (mu *MatchUpdate) AddStats(m ...*MatchPlayer) *MatchUpdate

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*MatchUpdate) AddTickRate

func (mu *MatchUpdate) AddTickRate(f float64) *MatchUpdate

AddTickRate adds f to the "tick_rate" field.

func (*MatchUpdate) ClearDecryptionKey

func (mu *MatchUpdate) ClearDecryptionKey() *MatchUpdate

ClearDecryptionKey clears the value of the "decryption_key" field.

func (*MatchUpdate) ClearMap

func (mu *MatchUpdate) ClearMap() *MatchUpdate

ClearMap clears the value of the "map" field.

func (*MatchUpdate) ClearPlayers

func (mu *MatchUpdate) ClearPlayers() *MatchUpdate

ClearPlayers clears all "players" edges to the Player entity.

func (*MatchUpdate) ClearReplayURL

func (mu *MatchUpdate) ClearReplayURL() *MatchUpdate

ClearReplayURL clears the value of the "replay_url" field.

func (*MatchUpdate) ClearStats

func (mu *MatchUpdate) ClearStats() *MatchUpdate

ClearStats clears all "stats" edges to the MatchPlayer entity.

func (*MatchUpdate) ClearTickRate

func (mu *MatchUpdate) ClearTickRate() *MatchUpdate

ClearTickRate clears the value of the "tick_rate" field.

func (*MatchUpdate) Exec

func (mu *MatchUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MatchUpdate) ExecX

func (mu *MatchUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchUpdate) Modify

func (mu *MatchUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MatchUpdate) Mutation

func (mu *MatchUpdate) Mutation() *MatchMutation

Mutation returns the MatchMutation object of the builder.

func (*MatchUpdate) RemovePlayerIDs

func (mu *MatchUpdate) RemovePlayerIDs(ids ...uint64) *MatchUpdate

RemovePlayerIDs removes the "players" edge to Player entities by IDs.

func (*MatchUpdate) RemovePlayers

func (mu *MatchUpdate) RemovePlayers(p ...*Player) *MatchUpdate

RemovePlayers removes "players" edges to Player entities.

func (*MatchUpdate) RemoveStatIDs

func (mu *MatchUpdate) RemoveStatIDs(ids ...int) *MatchUpdate

RemoveStatIDs removes the "stats" edge to MatchPlayer entities by IDs.

func (*MatchUpdate) RemoveStats

func (mu *MatchUpdate) RemoveStats(m ...*MatchPlayer) *MatchUpdate

RemoveStats removes "stats" edges to MatchPlayer entities.

func (*MatchUpdate) Save

func (mu *MatchUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MatchUpdate) SaveX

func (mu *MatchUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MatchUpdate) SetDate

func (mu *MatchUpdate) SetDate(t time.Time) *MatchUpdate

SetDate sets the "date" field.

func (*MatchUpdate) SetDecryptionKey

func (mu *MatchUpdate) SetDecryptionKey(b []byte) *MatchUpdate

SetDecryptionKey sets the "decryption_key" field.

func (*MatchUpdate) SetDemoParsed

func (mu *MatchUpdate) SetDemoParsed(b bool) *MatchUpdate

SetDemoParsed sets the "demo_parsed" field.

func (*MatchUpdate) SetDuration

func (mu *MatchUpdate) SetDuration(i int) *MatchUpdate

SetDuration sets the "duration" field.

func (*MatchUpdate) SetGamebanPresent

func (mu *MatchUpdate) SetGamebanPresent(b bool) *MatchUpdate

SetGamebanPresent sets the "gameban_present" field.

func (*MatchUpdate) SetMap

func (mu *MatchUpdate) SetMap(s string) *MatchUpdate

SetMap sets the "map" field.

func (*MatchUpdate) SetMatchResult

func (mu *MatchUpdate) SetMatchResult(i int) *MatchUpdate

SetMatchResult sets the "match_result" field.

func (*MatchUpdate) SetMaxRounds

func (mu *MatchUpdate) SetMaxRounds(i int) *MatchUpdate

SetMaxRounds sets the "max_rounds" field.

func (*MatchUpdate) SetNillableDemoParsed

func (mu *MatchUpdate) SetNillableDemoParsed(b *bool) *MatchUpdate

SetNillableDemoParsed sets the "demo_parsed" field if the given value is not nil.

func (*MatchUpdate) SetNillableGamebanPresent

func (mu *MatchUpdate) SetNillableGamebanPresent(b *bool) *MatchUpdate

SetNillableGamebanPresent sets the "gameban_present" field if the given value is not nil.

func (*MatchUpdate) SetNillableMap

func (mu *MatchUpdate) SetNillableMap(s *string) *MatchUpdate

SetNillableMap sets the "map" field if the given value is not nil.

func (*MatchUpdate) SetNillableReplayURL

func (mu *MatchUpdate) SetNillableReplayURL(s *string) *MatchUpdate

SetNillableReplayURL sets the "replay_url" field if the given value is not nil.

func (*MatchUpdate) SetNillableTickRate

func (mu *MatchUpdate) SetNillableTickRate(f *float64) *MatchUpdate

SetNillableTickRate sets the "tick_rate" field if the given value is not nil.

func (*MatchUpdate) SetNillableVacPresent

func (mu *MatchUpdate) SetNillableVacPresent(b *bool) *MatchUpdate

SetNillableVacPresent sets the "vac_present" field if the given value is not nil.

func (*MatchUpdate) SetReplayURL

func (mu *MatchUpdate) SetReplayURL(s string) *MatchUpdate

SetReplayURL sets the "replay_url" field.

func (*MatchUpdate) SetScoreTeamA

func (mu *MatchUpdate) SetScoreTeamA(i int) *MatchUpdate

SetScoreTeamA sets the "score_team_a" field.

func (*MatchUpdate) SetScoreTeamB

func (mu *MatchUpdate) SetScoreTeamB(i int) *MatchUpdate

SetScoreTeamB sets the "score_team_b" field.

func (*MatchUpdate) SetShareCode

func (mu *MatchUpdate) SetShareCode(s string) *MatchUpdate

SetShareCode sets the "share_code" field.

func (*MatchUpdate) SetTickRate

func (mu *MatchUpdate) SetTickRate(f float64) *MatchUpdate

SetTickRate sets the "tick_rate" field.

func (*MatchUpdate) SetVacPresent

func (mu *MatchUpdate) SetVacPresent(b bool) *MatchUpdate

SetVacPresent sets the "vac_present" field.

func (*MatchUpdate) Where

func (mu *MatchUpdate) Where(ps ...predicate.Match) *MatchUpdate

Where appends a list predicates to the MatchUpdate builder.

type MatchUpdateOne

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

MatchUpdateOne is the builder for updating a single Match entity.

func (*MatchUpdateOne) AddDuration

func (muo *MatchUpdateOne) AddDuration(i int) *MatchUpdateOne

AddDuration adds i to the "duration" field.

func (*MatchUpdateOne) AddMatchResult

func (muo *MatchUpdateOne) AddMatchResult(i int) *MatchUpdateOne

AddMatchResult adds i to the "match_result" field.

func (*MatchUpdateOne) AddMaxRounds

func (muo *MatchUpdateOne) AddMaxRounds(i int) *MatchUpdateOne

AddMaxRounds adds i to the "max_rounds" field.

func (*MatchUpdateOne) AddPlayerIDs

func (muo *MatchUpdateOne) AddPlayerIDs(ids ...uint64) *MatchUpdateOne

AddPlayerIDs adds the "players" edge to the Player entity by IDs.

func (*MatchUpdateOne) AddPlayers

func (muo *MatchUpdateOne) AddPlayers(p ...*Player) *MatchUpdateOne

AddPlayers adds the "players" edges to the Player entity.

func (*MatchUpdateOne) AddScoreTeamA

func (muo *MatchUpdateOne) AddScoreTeamA(i int) *MatchUpdateOne

AddScoreTeamA adds i to the "score_team_a" field.

func (*MatchUpdateOne) AddScoreTeamB

func (muo *MatchUpdateOne) AddScoreTeamB(i int) *MatchUpdateOne

AddScoreTeamB adds i to the "score_team_b" field.

func (*MatchUpdateOne) AddStatIDs

func (muo *MatchUpdateOne) AddStatIDs(ids ...int) *MatchUpdateOne

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*MatchUpdateOne) AddStats

func (muo *MatchUpdateOne) AddStats(m ...*MatchPlayer) *MatchUpdateOne

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*MatchUpdateOne) AddTickRate

func (muo *MatchUpdateOne) AddTickRate(f float64) *MatchUpdateOne

AddTickRate adds f to the "tick_rate" field.

func (*MatchUpdateOne) ClearDecryptionKey

func (muo *MatchUpdateOne) ClearDecryptionKey() *MatchUpdateOne

ClearDecryptionKey clears the value of the "decryption_key" field.

func (*MatchUpdateOne) ClearMap

func (muo *MatchUpdateOne) ClearMap() *MatchUpdateOne

ClearMap clears the value of the "map" field.

func (*MatchUpdateOne) ClearPlayers

func (muo *MatchUpdateOne) ClearPlayers() *MatchUpdateOne

ClearPlayers clears all "players" edges to the Player entity.

func (*MatchUpdateOne) ClearReplayURL

func (muo *MatchUpdateOne) ClearReplayURL() *MatchUpdateOne

ClearReplayURL clears the value of the "replay_url" field.

func (*MatchUpdateOne) ClearStats

func (muo *MatchUpdateOne) ClearStats() *MatchUpdateOne

ClearStats clears all "stats" edges to the MatchPlayer entity.

func (*MatchUpdateOne) ClearTickRate

func (muo *MatchUpdateOne) ClearTickRate() *MatchUpdateOne

ClearTickRate clears the value of the "tick_rate" field.

func (*MatchUpdateOne) Exec

func (muo *MatchUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MatchUpdateOne) ExecX

func (muo *MatchUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MatchUpdateOne) Modify

func (muo *MatchUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MatchUpdateOne) Mutation

func (muo *MatchUpdateOne) Mutation() *MatchMutation

Mutation returns the MatchMutation object of the builder.

func (*MatchUpdateOne) RemovePlayerIDs

func (muo *MatchUpdateOne) RemovePlayerIDs(ids ...uint64) *MatchUpdateOne

RemovePlayerIDs removes the "players" edge to Player entities by IDs.

func (*MatchUpdateOne) RemovePlayers

func (muo *MatchUpdateOne) RemovePlayers(p ...*Player) *MatchUpdateOne

RemovePlayers removes "players" edges to Player entities.

func (*MatchUpdateOne) RemoveStatIDs

func (muo *MatchUpdateOne) RemoveStatIDs(ids ...int) *MatchUpdateOne

RemoveStatIDs removes the "stats" edge to MatchPlayer entities by IDs.

func (*MatchUpdateOne) RemoveStats

func (muo *MatchUpdateOne) RemoveStats(m ...*MatchPlayer) *MatchUpdateOne

RemoveStats removes "stats" edges to MatchPlayer entities.

func (*MatchUpdateOne) Save

func (muo *MatchUpdateOne) Save(ctx context.Context) (*Match, error)

Save executes the query and returns the updated Match entity.

func (*MatchUpdateOne) SaveX

func (muo *MatchUpdateOne) SaveX(ctx context.Context) *Match

SaveX is like Save, but panics if an error occurs.

func (*MatchUpdateOne) Select

func (muo *MatchUpdateOne) Select(field string, fields ...string) *MatchUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MatchUpdateOne) SetDate

func (muo *MatchUpdateOne) SetDate(t time.Time) *MatchUpdateOne

SetDate sets the "date" field.

func (*MatchUpdateOne) SetDecryptionKey

func (muo *MatchUpdateOne) SetDecryptionKey(b []byte) *MatchUpdateOne

SetDecryptionKey sets the "decryption_key" field.

func (*MatchUpdateOne) SetDemoParsed

func (muo *MatchUpdateOne) SetDemoParsed(b bool) *MatchUpdateOne

SetDemoParsed sets the "demo_parsed" field.

func (*MatchUpdateOne) SetDuration

func (muo *MatchUpdateOne) SetDuration(i int) *MatchUpdateOne

SetDuration sets the "duration" field.

func (*MatchUpdateOne) SetGamebanPresent

func (muo *MatchUpdateOne) SetGamebanPresent(b bool) *MatchUpdateOne

SetGamebanPresent sets the "gameban_present" field.

func (*MatchUpdateOne) SetMap

func (muo *MatchUpdateOne) SetMap(s string) *MatchUpdateOne

SetMap sets the "map" field.

func (*MatchUpdateOne) SetMatchResult

func (muo *MatchUpdateOne) SetMatchResult(i int) *MatchUpdateOne

SetMatchResult sets the "match_result" field.

func (*MatchUpdateOne) SetMaxRounds

func (muo *MatchUpdateOne) SetMaxRounds(i int) *MatchUpdateOne

SetMaxRounds sets the "max_rounds" field.

func (*MatchUpdateOne) SetNillableDemoParsed

func (muo *MatchUpdateOne) SetNillableDemoParsed(b *bool) *MatchUpdateOne

SetNillableDemoParsed sets the "demo_parsed" field if the given value is not nil.

func (*MatchUpdateOne) SetNillableGamebanPresent

func (muo *MatchUpdateOne) SetNillableGamebanPresent(b *bool) *MatchUpdateOne

SetNillableGamebanPresent sets the "gameban_present" field if the given value is not nil.

func (*MatchUpdateOne) SetNillableMap

func (muo *MatchUpdateOne) SetNillableMap(s *string) *MatchUpdateOne

SetNillableMap sets the "map" field if the given value is not nil.

func (*MatchUpdateOne) SetNillableReplayURL

func (muo *MatchUpdateOne) SetNillableReplayURL(s *string) *MatchUpdateOne

SetNillableReplayURL sets the "replay_url" field if the given value is not nil.

func (*MatchUpdateOne) SetNillableTickRate

func (muo *MatchUpdateOne) SetNillableTickRate(f *float64) *MatchUpdateOne

SetNillableTickRate sets the "tick_rate" field if the given value is not nil.

func (*MatchUpdateOne) SetNillableVacPresent

func (muo *MatchUpdateOne) SetNillableVacPresent(b *bool) *MatchUpdateOne

SetNillableVacPresent sets the "vac_present" field if the given value is not nil.

func (*MatchUpdateOne) SetReplayURL

func (muo *MatchUpdateOne) SetReplayURL(s string) *MatchUpdateOne

SetReplayURL sets the "replay_url" field.

func (*MatchUpdateOne) SetScoreTeamA

func (muo *MatchUpdateOne) SetScoreTeamA(i int) *MatchUpdateOne

SetScoreTeamA sets the "score_team_a" field.

func (*MatchUpdateOne) SetScoreTeamB

func (muo *MatchUpdateOne) SetScoreTeamB(i int) *MatchUpdateOne

SetScoreTeamB sets the "score_team_b" field.

func (*MatchUpdateOne) SetShareCode

func (muo *MatchUpdateOne) SetShareCode(s string) *MatchUpdateOne

SetShareCode sets the "share_code" field.

func (*MatchUpdateOne) SetTickRate

func (muo *MatchUpdateOne) SetTickRate(f float64) *MatchUpdateOne

SetTickRate sets the "tick_rate" field.

func (*MatchUpdateOne) SetVacPresent

func (muo *MatchUpdateOne) SetVacPresent(b bool) *MatchUpdateOne

SetVacPresent sets the "vac_present" field.

type Matches

type Matches []*Match

Matches is a parsable slice of Match.

type Messages

type Messages struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Message holds the value of the "message" field.
	Message string `json:"message,omitempty"`
	// AllChat holds the value of the "all_chat" field.
	AllChat bool `json:"all_chat,omitempty"`
	// Tick holds the value of the "tick" field.
	Tick int `json:"tick,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MessagesQuery when eager-loading is set.
	Edges MessagesEdges `json:"edges"`
	// contains filtered or unexported fields
}

Messages is the model entity for the Messages schema.

func (*Messages) QueryMatchPlayer

func (m *Messages) QueryMatchPlayer() *MatchPlayerQuery

QueryMatchPlayer queries the "match_player" edge of the Messages entity.

func (*Messages) String

func (m *Messages) String() string

String implements the fmt.Stringer.

func (*Messages) Unwrap

func (m *Messages) Unwrap() *Messages

Unwrap unwraps the Messages entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Messages) Update

func (m *Messages) Update() *MessagesUpdateOne

Update returns a builder for updating this Messages. Note that you need to call Messages.Unwrap() before calling this method if this Messages was returned from a transaction, and the transaction was committed or rolled back.

type MessagesClient

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

MessagesClient is a client for the Messages schema.

func NewMessagesClient

func NewMessagesClient(c config) *MessagesClient

NewMessagesClient returns a client for the Messages from the given config.

func (*MessagesClient) Create

func (c *MessagesClient) Create() *MessagesCreate

Create returns a builder for creating a Messages entity.

func (*MessagesClient) CreateBulk

func (c *MessagesClient) CreateBulk(builders ...*MessagesCreate) *MessagesCreateBulk

CreateBulk returns a builder for creating a bulk of Messages entities.

func (*MessagesClient) Delete

func (c *MessagesClient) Delete() *MessagesDelete

Delete returns a delete builder for Messages.

func (*MessagesClient) DeleteOne

func (c *MessagesClient) DeleteOne(m *Messages) *MessagesDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessagesClient) DeleteOneID

func (c *MessagesClient) DeleteOneID(id int) *MessagesDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*MessagesClient) Get

func (c *MessagesClient) Get(ctx context.Context, id int) (*Messages, error)

Get returns a Messages entity by its id.

func (*MessagesClient) GetX

func (c *MessagesClient) GetX(ctx context.Context, id int) *Messages

GetX is like Get, but panics if an error occurs.

func (*MessagesClient) Hooks

func (c *MessagesClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessagesClient) Query

func (c *MessagesClient) Query() *MessagesQuery

Query returns a query builder for Messages.

func (*MessagesClient) QueryMatchPlayer

func (c *MessagesClient) QueryMatchPlayer(m *Messages) *MatchPlayerQuery

QueryMatchPlayer queries the match_player edge of a Messages.

func (*MessagesClient) Update

func (c *MessagesClient) Update() *MessagesUpdate

Update returns an update builder for Messages.

func (*MessagesClient) UpdateOne

func (c *MessagesClient) UpdateOne(m *Messages) *MessagesUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessagesClient) UpdateOneID

func (c *MessagesClient) UpdateOneID(id int) *MessagesUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MessagesClient) Use

func (c *MessagesClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messages.Hooks(f(g(h())))`.

type MessagesCreate

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

MessagesCreate is the builder for creating a Messages entity.

func (*MessagesCreate) Exec

func (mc *MessagesCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagesCreate) ExecX

func (mc *MessagesCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessagesCreate) Mutation

func (mc *MessagesCreate) Mutation() *MessagesMutation

Mutation returns the MessagesMutation object of the builder.

func (*MessagesCreate) Save

func (mc *MessagesCreate) Save(ctx context.Context) (*Messages, error)

Save creates the Messages in the database.

func (*MessagesCreate) SaveX

func (mc *MessagesCreate) SaveX(ctx context.Context) *Messages

SaveX calls Save and panics if Save returns an error.

func (*MessagesCreate) SetAllChat

func (mc *MessagesCreate) SetAllChat(b bool) *MessagesCreate

SetAllChat sets the "all_chat" field.

func (*MessagesCreate) SetMatchPlayer

func (mc *MessagesCreate) SetMatchPlayer(m *MatchPlayer) *MessagesCreate

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*MessagesCreate) SetMatchPlayerID

func (mc *MessagesCreate) SetMatchPlayerID(id int) *MessagesCreate

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*MessagesCreate) SetMessage

func (mc *MessagesCreate) SetMessage(s string) *MessagesCreate

SetMessage sets the "message" field.

func (*MessagesCreate) SetNillableMatchPlayerID

func (mc *MessagesCreate) SetNillableMatchPlayerID(id *int) *MessagesCreate

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*MessagesCreate) SetTick

func (mc *MessagesCreate) SetTick(i int) *MessagesCreate

SetTick sets the "tick" field.

type MessagesCreateBulk

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

MessagesCreateBulk is the builder for creating many Messages entities in bulk.

func (*MessagesCreateBulk) Exec

func (mcb *MessagesCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagesCreateBulk) ExecX

func (mcb *MessagesCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessagesCreateBulk) Save

func (mcb *MessagesCreateBulk) Save(ctx context.Context) ([]*Messages, error)

Save creates the Messages entities in the database.

func (*MessagesCreateBulk) SaveX

func (mcb *MessagesCreateBulk) SaveX(ctx context.Context) []*Messages

SaveX is like Save, but panics if an error occurs.

type MessagesDelete

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

MessagesDelete is the builder for deleting a Messages entity.

func (*MessagesDelete) Exec

func (md *MessagesDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessagesDelete) ExecX

func (md *MessagesDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessagesDelete) Where

func (md *MessagesDelete) Where(ps ...predicate.Messages) *MessagesDelete

Where appends a list predicates to the MessagesDelete builder.

type MessagesDeleteOne

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

MessagesDeleteOne is the builder for deleting a single Messages entity.

func (*MessagesDeleteOne) Exec

func (mdo *MessagesDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MessagesDeleteOne) ExecX

func (mdo *MessagesDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessagesEdges

type MessagesEdges struct {
	// MatchPlayer holds the value of the match_player edge.
	MatchPlayer *MatchPlayer `json:"match_player,omitempty"`
	// contains filtered or unexported fields
}

MessagesEdges holds the relations/edges for other nodes in the graph.

func (MessagesEdges) MatchPlayerOrErr

func (e MessagesEdges) MatchPlayerOrErr() (*MatchPlayer, error)

MatchPlayerOrErr returns the MatchPlayer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MessagesGroupBy

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

MessagesGroupBy is the group-by builder for Messages entities.

func (*MessagesGroupBy) Aggregate

func (mgb *MessagesGroupBy) Aggregate(fns ...AggregateFunc) *MessagesGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MessagesGroupBy) Bool

func (s *MessagesGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) BoolX

func (s *MessagesGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessagesGroupBy) Bools

func (s *MessagesGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) BoolsX

func (s *MessagesGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessagesGroupBy) Float64

func (s *MessagesGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) Float64X

func (s *MessagesGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessagesGroupBy) Float64s

func (s *MessagesGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) Float64sX

func (s *MessagesGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessagesGroupBy) Int

func (s *MessagesGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) IntX

func (s *MessagesGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessagesGroupBy) Ints

func (s *MessagesGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) IntsX

func (s *MessagesGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessagesGroupBy) Scan

func (mgb *MessagesGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*MessagesGroupBy) ScanX

func (s *MessagesGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MessagesGroupBy) String

func (s *MessagesGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) StringX

func (s *MessagesGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessagesGroupBy) Strings

func (s *MessagesGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessagesGroupBy) StringsX

func (s *MessagesGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessagesMutation

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

MessagesMutation represents an operation that mutates the Messages nodes in the graph.

func (*MessagesMutation) AddField

func (m *MessagesMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MessagesMutation) AddTick

func (m *MessagesMutation) AddTick(i int)

AddTick adds i to the "tick" field.

func (*MessagesMutation) AddedEdges

func (m *MessagesMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessagesMutation) AddedField

func (m *MessagesMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MessagesMutation) AddedFields

func (m *MessagesMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessagesMutation) AddedIDs

func (m *MessagesMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessagesMutation) AddedTick

func (m *MessagesMutation) AddedTick() (r int, exists bool)

AddedTick returns the value that was added to the "tick" field in this mutation.

func (*MessagesMutation) AllChat

func (m *MessagesMutation) AllChat() (r bool, exists bool)

AllChat returns the value of the "all_chat" field in the mutation.

func (*MessagesMutation) ClearEdge

func (m *MessagesMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*MessagesMutation) ClearField

func (m *MessagesMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*MessagesMutation) ClearMatchPlayer

func (m *MessagesMutation) ClearMatchPlayer()

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*MessagesMutation) ClearedEdges

func (m *MessagesMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessagesMutation) ClearedFields

func (m *MessagesMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessagesMutation) Client

func (m MessagesMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*MessagesMutation) EdgeCleared

func (m *MessagesMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessagesMutation) Field

func (m *MessagesMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MessagesMutation) FieldCleared

func (m *MessagesMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessagesMutation) Fields

func (m *MessagesMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*MessagesMutation) ID

func (m *MessagesMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MessagesMutation) IDs

func (m *MessagesMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MessagesMutation) MatchPlayerCleared

func (m *MessagesMutation) MatchPlayerCleared() bool

MatchPlayerCleared reports if the "match_player" edge to the MatchPlayer entity was cleared.

func (*MessagesMutation) MatchPlayerID

func (m *MessagesMutation) MatchPlayerID() (id int, exists bool)

MatchPlayerID returns the "match_player" edge ID in the mutation.

func (*MessagesMutation) MatchPlayerIDs

func (m *MessagesMutation) MatchPlayerIDs() (ids []int)

MatchPlayerIDs returns the "match_player" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MatchPlayerID instead. It exists only for internal usage by the builders.

func (*MessagesMutation) Message

func (m *MessagesMutation) Message() (r string, exists bool)

Message returns the value of the "message" field in the mutation.

func (*MessagesMutation) OldAllChat

func (m *MessagesMutation) OldAllChat(ctx context.Context) (v bool, err error)

OldAllChat returns the old "all_chat" field's value of the Messages entity. If the Messages object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MessagesMutation) OldField

func (m *MessagesMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MessagesMutation) OldMessage

func (m *MessagesMutation) OldMessage(ctx context.Context) (v string, err error)

OldMessage returns the old "message" field's value of the Messages entity. If the Messages object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MessagesMutation) OldTick

func (m *MessagesMutation) OldTick(ctx context.Context) (v int, err error)

OldTick returns the old "tick" field's value of the Messages entity. If the Messages object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MessagesMutation) Op

func (m *MessagesMutation) Op() Op

Op returns the operation name.

func (*MessagesMutation) RemovedEdges

func (m *MessagesMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessagesMutation) RemovedIDs

func (m *MessagesMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MessagesMutation) ResetAllChat

func (m *MessagesMutation) ResetAllChat()

ResetAllChat resets all changes to the "all_chat" field.

func (*MessagesMutation) ResetEdge

func (m *MessagesMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*MessagesMutation) ResetField

func (m *MessagesMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*MessagesMutation) ResetMatchPlayer

func (m *MessagesMutation) ResetMatchPlayer()

ResetMatchPlayer resets all changes to the "match_player" edge.

func (*MessagesMutation) ResetMessage

func (m *MessagesMutation) ResetMessage()

ResetMessage resets all changes to the "message" field.

func (*MessagesMutation) ResetTick

func (m *MessagesMutation) ResetTick()

ResetTick resets all changes to the "tick" field.

func (*MessagesMutation) SetAllChat

func (m *MessagesMutation) SetAllChat(b bool)

SetAllChat sets the "all_chat" field.

func (*MessagesMutation) SetField

func (m *MessagesMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MessagesMutation) SetMatchPlayerID

func (m *MessagesMutation) SetMatchPlayerID(id int)

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by id.

func (*MessagesMutation) SetMessage

func (m *MessagesMutation) SetMessage(s string)

SetMessage sets the "message" field.

func (*MessagesMutation) SetTick

func (m *MessagesMutation) SetTick(i int)

SetTick sets the "tick" field.

func (*MessagesMutation) Tick

func (m *MessagesMutation) Tick() (r int, exists bool)

Tick returns the value of the "tick" field in the mutation.

func (MessagesMutation) Tx

func (m MessagesMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessagesMutation) Type

func (m *MessagesMutation) Type() string

Type returns the node type of this mutation (Messages).

func (*MessagesMutation) Where

func (m *MessagesMutation) Where(ps ...predicate.Messages)

Where appends a list predicates to the MessagesMutation builder.

type MessagesQuery

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

MessagesQuery is the builder for querying Messages entities.

func (*MessagesQuery) All

func (mq *MessagesQuery) All(ctx context.Context) ([]*Messages, error)

All executes the query and returns a list of MessagesSlice.

func (*MessagesQuery) AllX

func (mq *MessagesQuery) AllX(ctx context.Context) []*Messages

AllX is like All, but panics if an error occurs.

func (*MessagesQuery) Clone

func (mq *MessagesQuery) Clone() *MessagesQuery

Clone returns a duplicate of the MessagesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessagesQuery) Count

func (mq *MessagesQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessagesQuery) CountX

func (mq *MessagesQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessagesQuery) Exist

func (mq *MessagesQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessagesQuery) ExistX

func (mq *MessagesQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessagesQuery) First

func (mq *MessagesQuery) First(ctx context.Context) (*Messages, error)

First returns the first Messages entity from the query. Returns a *NotFoundError when no Messages was found.

func (*MessagesQuery) FirstID

func (mq *MessagesQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Messages ID from the query. Returns a *NotFoundError when no Messages ID was found.

func (*MessagesQuery) FirstIDX

func (mq *MessagesQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessagesQuery) FirstX

func (mq *MessagesQuery) FirstX(ctx context.Context) *Messages

FirstX is like First, but panics if an error occurs.

func (*MessagesQuery) GroupBy

func (mq *MessagesQuery) GroupBy(field string, fields ...string) *MessagesGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Message string `json:"message,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Messages.Query().
	GroupBy(messages.FieldMessage).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessagesQuery) IDs

func (mq *MessagesQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Messages IDs.

func (*MessagesQuery) IDsX

func (mq *MessagesQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessagesQuery) Limit

func (mq *MessagesQuery) Limit(limit int) *MessagesQuery

Limit adds a limit step to the query.

func (*MessagesQuery) Modify

func (mq *MessagesQuery) Modify(modifiers ...func(s *sql.Selector)) *MessagesSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MessagesQuery) Offset

func (mq *MessagesQuery) Offset(offset int) *MessagesQuery

Offset adds an offset step to the query.

func (*MessagesQuery) Only

func (mq *MessagesQuery) Only(ctx context.Context) (*Messages, error)

Only returns a single Messages entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Messages entity is found. Returns a *NotFoundError when no Messages entities are found.

func (*MessagesQuery) OnlyID

func (mq *MessagesQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Messages ID in the query. Returns a *NotSingularError when more than one Messages ID is found. Returns a *NotFoundError when no entities are found.

func (*MessagesQuery) OnlyIDX

func (mq *MessagesQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessagesQuery) OnlyX

func (mq *MessagesQuery) OnlyX(ctx context.Context) *Messages

OnlyX is like Only, but panics if an error occurs.

func (*MessagesQuery) Order

func (mq *MessagesQuery) Order(o ...OrderFunc) *MessagesQuery

Order adds an order step to the query.

func (*MessagesQuery) QueryMatchPlayer

func (mq *MessagesQuery) QueryMatchPlayer() *MatchPlayerQuery

QueryMatchPlayer chains the current query on the "match_player" edge.

func (*MessagesQuery) Select

func (mq *MessagesQuery) Select(fields ...string) *MessagesSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Message string `json:"message,omitempty"`
}

client.Messages.Query().
	Select(messages.FieldMessage).
	Scan(ctx, &v)

func (*MessagesQuery) Unique

func (mq *MessagesQuery) Unique(unique bool) *MessagesQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MessagesQuery) Where

func (mq *MessagesQuery) Where(ps ...predicate.Messages) *MessagesQuery

Where adds a new predicate for the MessagesQuery builder.

func (*MessagesQuery) WithMatchPlayer

func (mq *MessagesQuery) WithMatchPlayer(opts ...func(*MatchPlayerQuery)) *MessagesQuery

WithMatchPlayer tells the query-builder to eager-load the nodes that are connected to the "match_player" edge. The optional arguments are used to configure the query builder of the edge.

type MessagesSelect

type MessagesSelect struct {
	*MessagesQuery
	// contains filtered or unexported fields
}

MessagesSelect is the builder for selecting fields of Messages entities.

func (*MessagesSelect) Bool

func (s *MessagesSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) BoolX

func (s *MessagesSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessagesSelect) Bools

func (s *MessagesSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) BoolsX

func (s *MessagesSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessagesSelect) Float64

func (s *MessagesSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) Float64X

func (s *MessagesSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessagesSelect) Float64s

func (s *MessagesSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) Float64sX

func (s *MessagesSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessagesSelect) Int

func (s *MessagesSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) IntX

func (s *MessagesSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessagesSelect) Ints

func (s *MessagesSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) IntsX

func (s *MessagesSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessagesSelect) Modify

func (ms *MessagesSelect) Modify(modifiers ...func(s *sql.Selector)) *MessagesSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MessagesSelect) Scan

func (ms *MessagesSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*MessagesSelect) ScanX

func (s *MessagesSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MessagesSelect) String

func (s *MessagesSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) StringX

func (s *MessagesSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessagesSelect) Strings

func (s *MessagesSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessagesSelect) StringsX

func (s *MessagesSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessagesSlice

type MessagesSlice []*Messages

MessagesSlice is a parsable slice of Messages.

type MessagesUpdate

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

MessagesUpdate is the builder for updating Messages entities.

func (*MessagesUpdate) AddTick

func (mu *MessagesUpdate) AddTick(i int) *MessagesUpdate

AddTick adds i to the "tick" field.

func (*MessagesUpdate) ClearMatchPlayer

func (mu *MessagesUpdate) ClearMatchPlayer() *MessagesUpdate

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*MessagesUpdate) Exec

func (mu *MessagesUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessagesUpdate) ExecX

func (mu *MessagesUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessagesUpdate) Modify

func (mu *MessagesUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MessagesUpdate) Mutation

func (mu *MessagesUpdate) Mutation() *MessagesMutation

Mutation returns the MessagesMutation object of the builder.

func (*MessagesUpdate) Save

func (mu *MessagesUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessagesUpdate) SaveX

func (mu *MessagesUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessagesUpdate) SetAllChat

func (mu *MessagesUpdate) SetAllChat(b bool) *MessagesUpdate

SetAllChat sets the "all_chat" field.

func (*MessagesUpdate) SetMatchPlayer

func (mu *MessagesUpdate) SetMatchPlayer(m *MatchPlayer) *MessagesUpdate

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*MessagesUpdate) SetMatchPlayerID

func (mu *MessagesUpdate) SetMatchPlayerID(id int) *MessagesUpdate

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*MessagesUpdate) SetMessage

func (mu *MessagesUpdate) SetMessage(s string) *MessagesUpdate

SetMessage sets the "message" field.

func (*MessagesUpdate) SetNillableMatchPlayerID

func (mu *MessagesUpdate) SetNillableMatchPlayerID(id *int) *MessagesUpdate

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*MessagesUpdate) SetTick

func (mu *MessagesUpdate) SetTick(i int) *MessagesUpdate

SetTick sets the "tick" field.

func (*MessagesUpdate) Where

func (mu *MessagesUpdate) Where(ps ...predicate.Messages) *MessagesUpdate

Where appends a list predicates to the MessagesUpdate builder.

type MessagesUpdateOne

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

MessagesUpdateOne is the builder for updating a single Messages entity.

func (*MessagesUpdateOne) AddTick

func (muo *MessagesUpdateOne) AddTick(i int) *MessagesUpdateOne

AddTick adds i to the "tick" field.

func (*MessagesUpdateOne) ClearMatchPlayer

func (muo *MessagesUpdateOne) ClearMatchPlayer() *MessagesUpdateOne

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*MessagesUpdateOne) Exec

func (muo *MessagesUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MessagesUpdateOne) ExecX

func (muo *MessagesUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessagesUpdateOne) Modify

func (muo *MessagesUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MessagesUpdateOne) Mutation

func (muo *MessagesUpdateOne) Mutation() *MessagesMutation

Mutation returns the MessagesMutation object of the builder.

func (*MessagesUpdateOne) Save

func (muo *MessagesUpdateOne) Save(ctx context.Context) (*Messages, error)

Save executes the query and returns the updated Messages entity.

func (*MessagesUpdateOne) SaveX

func (muo *MessagesUpdateOne) SaveX(ctx context.Context) *Messages

SaveX is like Save, but panics if an error occurs.

func (*MessagesUpdateOne) Select

func (muo *MessagesUpdateOne) Select(field string, fields ...string) *MessagesUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessagesUpdateOne) SetAllChat

func (muo *MessagesUpdateOne) SetAllChat(b bool) *MessagesUpdateOne

SetAllChat sets the "all_chat" field.

func (*MessagesUpdateOne) SetMatchPlayer

func (muo *MessagesUpdateOne) SetMatchPlayer(m *MatchPlayer) *MessagesUpdateOne

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*MessagesUpdateOne) SetMatchPlayerID

func (muo *MessagesUpdateOne) SetMatchPlayerID(id int) *MessagesUpdateOne

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*MessagesUpdateOne) SetMessage

func (muo *MessagesUpdateOne) SetMessage(s string) *MessagesUpdateOne

SetMessage sets the "message" field.

func (*MessagesUpdateOne) SetNillableMatchPlayerID

func (muo *MessagesUpdateOne) SetNillableMatchPlayerID(id *int) *MessagesUpdateOne

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*MessagesUpdateOne) SetTick

func (muo *MessagesUpdateOne) SetTick(i int) *MessagesUpdateOne

SetTick sets the "tick" field.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Player

type Player struct {

	// ID of the ent.
	ID uint64 `json:"steamid,string"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Avatar holds the value of the "avatar" field.
	Avatar string `json:"avatar,omitempty"`
	// VanityURL holds the value of the "vanity_url" field.
	VanityURL string `json:"vanity_url,omitempty"`
	// VanityURLReal holds the value of the "vanity_url_real" field.
	VanityURLReal string `json:"vanity_url_real,omitempty"`
	// VacDate holds the value of the "vac_date" field.
	VacDate time.Time `json:"vac_date,omitempty"`
	// VacCount holds the value of the "vac_count" field.
	VacCount int `json:"vac_count,omitempty"`
	// GameBanDate holds the value of the "game_ban_date" field.
	GameBanDate time.Time `json:"game_ban_date,omitempty"`
	// GameBanCount holds the value of the "game_ban_count" field.
	GameBanCount int `json:"game_ban_count,omitempty"`
	// SteamUpdated holds the value of the "steam_updated" field.
	SteamUpdated time.Time `json:"-"`
	// SharecodeUpdated holds the value of the "sharecode_updated" field.
	SharecodeUpdated time.Time `json:"-"`
	// AuthCode holds the value of the "auth_code" field.
	AuthCode string `json:"-"`
	// ProfileCreated holds the value of the "profile_created" field.
	ProfileCreated time.Time `json:"profile_created,omitempty"`
	// OldestSharecodeSeen holds the value of the "oldest_sharecode_seen" field.
	OldestSharecodeSeen string `json:"oldest_sharecode_seen,omitempty"`
	// Wins holds the value of the "wins" field.
	Wins int `json:"wins,omitempty"`
	// Looses holds the value of the "looses" field.
	Looses int `json:"looses,omitempty"`
	// Ties holds the value of the "ties" field.
	Ties int `json:"ties,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PlayerQuery when eager-loading is set.
	Edges PlayerEdges `json:"edges"`
	// contains filtered or unexported fields
}

Player is the model entity for the Player schema.

func (*Player) QueryMatches

func (pl *Player) QueryMatches() *MatchQuery

QueryMatches queries the "matches" edge of the Player entity.

func (*Player) QueryStats

func (pl *Player) QueryStats() *MatchPlayerQuery

QueryStats queries the "stats" edge of the Player entity.

func (*Player) String

func (pl *Player) String() string

String implements the fmt.Stringer.

func (*Player) Unwrap

func (pl *Player) Unwrap() *Player

Unwrap unwraps the Player entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Player) Update

func (pl *Player) Update() *PlayerUpdateOne

Update returns a builder for updating this Player. Note that you need to call Player.Unwrap() before calling this method if this Player was returned from a transaction, and the transaction was committed or rolled back.

type PlayerClient

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

PlayerClient is a client for the Player schema.

func NewPlayerClient

func NewPlayerClient(c config) *PlayerClient

NewPlayerClient returns a client for the Player from the given config.

func (*PlayerClient) Create

func (c *PlayerClient) Create() *PlayerCreate

Create returns a builder for creating a Player entity.

func (*PlayerClient) CreateBulk

func (c *PlayerClient) CreateBulk(builders ...*PlayerCreate) *PlayerCreateBulk

CreateBulk returns a builder for creating a bulk of Player entities.

func (*PlayerClient) Delete

func (c *PlayerClient) Delete() *PlayerDelete

Delete returns a delete builder for Player.

func (*PlayerClient) DeleteOne

func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PlayerClient) DeleteOneID

func (c *PlayerClient) DeleteOneID(id uint64) *PlayerDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*PlayerClient) Get

func (c *PlayerClient) Get(ctx context.Context, id uint64) (*Player, error)

Get returns a Player entity by its id.

func (*PlayerClient) GetX

func (c *PlayerClient) GetX(ctx context.Context, id uint64) *Player

GetX is like Get, but panics if an error occurs.

func (*PlayerClient) Hooks

func (c *PlayerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PlayerClient) Query

func (c *PlayerClient) Query() *PlayerQuery

Query returns a query builder for Player.

func (*PlayerClient) QueryMatches

func (c *PlayerClient) QueryMatches(pl *Player) *MatchQuery

QueryMatches queries the matches edge of a Player.

func (*PlayerClient) QueryStats

func (c *PlayerClient) QueryStats(pl *Player) *MatchPlayerQuery

QueryStats queries the stats edge of a Player.

func (*PlayerClient) Update

func (c *PlayerClient) Update() *PlayerUpdate

Update returns an update builder for Player.

func (*PlayerClient) UpdateOne

func (c *PlayerClient) UpdateOne(pl *Player) *PlayerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PlayerClient) UpdateOneID

func (c *PlayerClient) UpdateOneID(id uint64) *PlayerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PlayerClient) Use

func (c *PlayerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `player.Hooks(f(g(h())))`.

type PlayerCreate

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

PlayerCreate is the builder for creating a Player entity.

func (*PlayerCreate) AddMatchIDs

func (pc *PlayerCreate) AddMatchIDs(ids ...uint64) *PlayerCreate

AddMatchIDs adds the "matches" edge to the Match entity by IDs.

func (*PlayerCreate) AddMatches

func (pc *PlayerCreate) AddMatches(m ...*Match) *PlayerCreate

AddMatches adds the "matches" edges to the Match entity.

func (*PlayerCreate) AddStatIDs

func (pc *PlayerCreate) AddStatIDs(ids ...int) *PlayerCreate

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*PlayerCreate) AddStats

func (pc *PlayerCreate) AddStats(m ...*MatchPlayer) *PlayerCreate

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*PlayerCreate) Exec

func (pc *PlayerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlayerCreate) ExecX

func (pc *PlayerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlayerCreate) Mutation

func (pc *PlayerCreate) Mutation() *PlayerMutation

Mutation returns the PlayerMutation object of the builder.

func (*PlayerCreate) Save

func (pc *PlayerCreate) Save(ctx context.Context) (*Player, error)

Save creates the Player in the database.

func (*PlayerCreate) SaveX

func (pc *PlayerCreate) SaveX(ctx context.Context) *Player

SaveX calls Save and panics if Save returns an error.

func (*PlayerCreate) SetAuthCode

func (pc *PlayerCreate) SetAuthCode(s string) *PlayerCreate

SetAuthCode sets the "auth_code" field.

func (*PlayerCreate) SetAvatar

func (pc *PlayerCreate) SetAvatar(s string) *PlayerCreate

SetAvatar sets the "avatar" field.

func (*PlayerCreate) SetGameBanCount

func (pc *PlayerCreate) SetGameBanCount(i int) *PlayerCreate

SetGameBanCount sets the "game_ban_count" field.

func (*PlayerCreate) SetGameBanDate

func (pc *PlayerCreate) SetGameBanDate(t time.Time) *PlayerCreate

SetGameBanDate sets the "game_ban_date" field.

func (*PlayerCreate) SetID

func (pc *PlayerCreate) SetID(u uint64) *PlayerCreate

SetID sets the "id" field.

func (*PlayerCreate) SetLooses

func (pc *PlayerCreate) SetLooses(i int) *PlayerCreate

SetLooses sets the "looses" field.

func (*PlayerCreate) SetName

func (pc *PlayerCreate) SetName(s string) *PlayerCreate

SetName sets the "name" field.

func (*PlayerCreate) SetNillableAuthCode

func (pc *PlayerCreate) SetNillableAuthCode(s *string) *PlayerCreate

SetNillableAuthCode sets the "auth_code" field if the given value is not nil.

func (*PlayerCreate) SetNillableAvatar

func (pc *PlayerCreate) SetNillableAvatar(s *string) *PlayerCreate

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*PlayerCreate) SetNillableGameBanCount

func (pc *PlayerCreate) SetNillableGameBanCount(i *int) *PlayerCreate

SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.

func (*PlayerCreate) SetNillableGameBanDate

func (pc *PlayerCreate) SetNillableGameBanDate(t *time.Time) *PlayerCreate

SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.

func (*PlayerCreate) SetNillableLooses

func (pc *PlayerCreate) SetNillableLooses(i *int) *PlayerCreate

SetNillableLooses sets the "looses" field if the given value is not nil.

func (*PlayerCreate) SetNillableName

func (pc *PlayerCreate) SetNillableName(s *string) *PlayerCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*PlayerCreate) SetNillableOldestSharecodeSeen

func (pc *PlayerCreate) SetNillableOldestSharecodeSeen(s *string) *PlayerCreate

SetNillableOldestSharecodeSeen sets the "oldest_sharecode_seen" field if the given value is not nil.

func (*PlayerCreate) SetNillableProfileCreated

func (pc *PlayerCreate) SetNillableProfileCreated(t *time.Time) *PlayerCreate

SetNillableProfileCreated sets the "profile_created" field if the given value is not nil.

func (*PlayerCreate) SetNillableSharecodeUpdated

func (pc *PlayerCreate) SetNillableSharecodeUpdated(t *time.Time) *PlayerCreate

SetNillableSharecodeUpdated sets the "sharecode_updated" field if the given value is not nil.

func (*PlayerCreate) SetNillableSteamUpdated

func (pc *PlayerCreate) SetNillableSteamUpdated(t *time.Time) *PlayerCreate

SetNillableSteamUpdated sets the "steam_updated" field if the given value is not nil.

func (*PlayerCreate) SetNillableTies

func (pc *PlayerCreate) SetNillableTies(i *int) *PlayerCreate

SetNillableTies sets the "ties" field if the given value is not nil.

func (*PlayerCreate) SetNillableVacCount

func (pc *PlayerCreate) SetNillableVacCount(i *int) *PlayerCreate

SetNillableVacCount sets the "vac_count" field if the given value is not nil.

func (*PlayerCreate) SetNillableVacDate

func (pc *PlayerCreate) SetNillableVacDate(t *time.Time) *PlayerCreate

SetNillableVacDate sets the "vac_date" field if the given value is not nil.

func (*PlayerCreate) SetNillableVanityURL

func (pc *PlayerCreate) SetNillableVanityURL(s *string) *PlayerCreate

SetNillableVanityURL sets the "vanity_url" field if the given value is not nil.

func (*PlayerCreate) SetNillableVanityURLReal

func (pc *PlayerCreate) SetNillableVanityURLReal(s *string) *PlayerCreate

SetNillableVanityURLReal sets the "vanity_url_real" field if the given value is not nil.

func (*PlayerCreate) SetNillableWins

func (pc *PlayerCreate) SetNillableWins(i *int) *PlayerCreate

SetNillableWins sets the "wins" field if the given value is not nil.

func (*PlayerCreate) SetOldestSharecodeSeen

func (pc *PlayerCreate) SetOldestSharecodeSeen(s string) *PlayerCreate

SetOldestSharecodeSeen sets the "oldest_sharecode_seen" field.

func (*PlayerCreate) SetProfileCreated

func (pc *PlayerCreate) SetProfileCreated(t time.Time) *PlayerCreate

SetProfileCreated sets the "profile_created" field.

func (*PlayerCreate) SetSharecodeUpdated

func (pc *PlayerCreate) SetSharecodeUpdated(t time.Time) *PlayerCreate

SetSharecodeUpdated sets the "sharecode_updated" field.

func (*PlayerCreate) SetSteamUpdated

func (pc *PlayerCreate) SetSteamUpdated(t time.Time) *PlayerCreate

SetSteamUpdated sets the "steam_updated" field.

func (*PlayerCreate) SetTies

func (pc *PlayerCreate) SetTies(i int) *PlayerCreate

SetTies sets the "ties" field.

func (*PlayerCreate) SetVacCount

func (pc *PlayerCreate) SetVacCount(i int) *PlayerCreate

SetVacCount sets the "vac_count" field.

func (*PlayerCreate) SetVacDate

func (pc *PlayerCreate) SetVacDate(t time.Time) *PlayerCreate

SetVacDate sets the "vac_date" field.

func (*PlayerCreate) SetVanityURL

func (pc *PlayerCreate) SetVanityURL(s string) *PlayerCreate

SetVanityURL sets the "vanity_url" field.

func (*PlayerCreate) SetVanityURLReal

func (pc *PlayerCreate) SetVanityURLReal(s string) *PlayerCreate

SetVanityURLReal sets the "vanity_url_real" field.

func (*PlayerCreate) SetWins

func (pc *PlayerCreate) SetWins(i int) *PlayerCreate

SetWins sets the "wins" field.

type PlayerCreateBulk

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

PlayerCreateBulk is the builder for creating many Player entities in bulk.

func (*PlayerCreateBulk) Exec

func (pcb *PlayerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlayerCreateBulk) ExecX

func (pcb *PlayerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlayerCreateBulk) Save

func (pcb *PlayerCreateBulk) Save(ctx context.Context) ([]*Player, error)

Save creates the Player entities in the database.

func (*PlayerCreateBulk) SaveX

func (pcb *PlayerCreateBulk) SaveX(ctx context.Context) []*Player

SaveX is like Save, but panics if an error occurs.

type PlayerDelete

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

PlayerDelete is the builder for deleting a Player entity.

func (*PlayerDelete) Exec

func (pd *PlayerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PlayerDelete) ExecX

func (pd *PlayerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PlayerDelete) Where

func (pd *PlayerDelete) Where(ps ...predicate.Player) *PlayerDelete

Where appends a list predicates to the PlayerDelete builder.

type PlayerDeleteOne

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

PlayerDeleteOne is the builder for deleting a single Player entity.

func (*PlayerDeleteOne) Exec

func (pdo *PlayerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PlayerDeleteOne) ExecX

func (pdo *PlayerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PlayerEdges

type PlayerEdges struct {
	// Stats holds the value of the stats edge.
	Stats []*MatchPlayer `json:"stats,omitempty"`
	// Matches holds the value of the matches edge.
	Matches []*Match `json:"matches,omitempty"`
	// contains filtered or unexported fields
}

PlayerEdges holds the relations/edges for other nodes in the graph.

func (PlayerEdges) MatchesOrErr

func (e PlayerEdges) MatchesOrErr() ([]*Match, error)

MatchesOrErr returns the Matches value or an error if the edge was not loaded in eager-loading.

func (PlayerEdges) StatsOrErr

func (e PlayerEdges) StatsOrErr() ([]*MatchPlayer, error)

StatsOrErr returns the Stats value or an error if the edge was not loaded in eager-loading.

type PlayerGroupBy

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

PlayerGroupBy is the group-by builder for Player entities.

func (*PlayerGroupBy) Aggregate

func (pgb *PlayerGroupBy) Aggregate(fns ...AggregateFunc) *PlayerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PlayerGroupBy) Bool

func (s *PlayerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) BoolX

func (s *PlayerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PlayerGroupBy) Bools

func (s *PlayerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) BoolsX

func (s *PlayerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PlayerGroupBy) Float64

func (s *PlayerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) Float64X

func (s *PlayerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PlayerGroupBy) Float64s

func (s *PlayerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) Float64sX

func (s *PlayerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PlayerGroupBy) Int

func (s *PlayerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) IntX

func (s *PlayerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PlayerGroupBy) Ints

func (s *PlayerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) IntsX

func (s *PlayerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PlayerGroupBy) Scan

func (pgb *PlayerGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PlayerGroupBy) ScanX

func (s *PlayerGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PlayerGroupBy) String

func (s *PlayerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) StringX

func (s *PlayerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PlayerGroupBy) Strings

func (s *PlayerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PlayerGroupBy) StringsX

func (s *PlayerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PlayerMutation

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

PlayerMutation represents an operation that mutates the Player nodes in the graph.

func (*PlayerMutation) AddField

func (m *PlayerMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PlayerMutation) AddGameBanCount

func (m *PlayerMutation) AddGameBanCount(i int)

AddGameBanCount adds i to the "game_ban_count" field.

func (*PlayerMutation) AddLooses

func (m *PlayerMutation) AddLooses(i int)

AddLooses adds i to the "looses" field.

func (*PlayerMutation) AddMatchIDs

func (m *PlayerMutation) AddMatchIDs(ids ...uint64)

AddMatchIDs adds the "matches" edge to the Match entity by ids.

func (*PlayerMutation) AddStatIDs

func (m *PlayerMutation) AddStatIDs(ids ...int)

AddStatIDs adds the "stats" edge to the MatchPlayer entity by ids.

func (*PlayerMutation) AddTies

func (m *PlayerMutation) AddTies(i int)

AddTies adds i to the "ties" field.

func (*PlayerMutation) AddVacCount

func (m *PlayerMutation) AddVacCount(i int)

AddVacCount adds i to the "vac_count" field.

func (*PlayerMutation) AddWins

func (m *PlayerMutation) AddWins(i int)

AddWins adds i to the "wins" field.

func (*PlayerMutation) AddedEdges

func (m *PlayerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PlayerMutation) AddedField

func (m *PlayerMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PlayerMutation) AddedFields

func (m *PlayerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PlayerMutation) AddedGameBanCount

func (m *PlayerMutation) AddedGameBanCount() (r int, exists bool)

AddedGameBanCount returns the value that was added to the "game_ban_count" field in this mutation.

func (*PlayerMutation) AddedIDs

func (m *PlayerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PlayerMutation) AddedLooses

func (m *PlayerMutation) AddedLooses() (r int, exists bool)

AddedLooses returns the value that was added to the "looses" field in this mutation.

func (*PlayerMutation) AddedTies

func (m *PlayerMutation) AddedTies() (r int, exists bool)

AddedTies returns the value that was added to the "ties" field in this mutation.

func (*PlayerMutation) AddedVacCount

func (m *PlayerMutation) AddedVacCount() (r int, exists bool)

AddedVacCount returns the value that was added to the "vac_count" field in this mutation.

func (*PlayerMutation) AddedWins

func (m *PlayerMutation) AddedWins() (r int, exists bool)

AddedWins returns the value that was added to the "wins" field in this mutation.

func (*PlayerMutation) AuthCode

func (m *PlayerMutation) AuthCode() (r string, exists bool)

AuthCode returns the value of the "auth_code" field in the mutation.

func (*PlayerMutation) AuthCodeCleared

func (m *PlayerMutation) AuthCodeCleared() bool

AuthCodeCleared returns if the "auth_code" field was cleared in this mutation.

func (*PlayerMutation) Avatar

func (m *PlayerMutation) Avatar() (r string, exists bool)

Avatar returns the value of the "avatar" field in the mutation.

func (*PlayerMutation) AvatarCleared

func (m *PlayerMutation) AvatarCleared() bool

AvatarCleared returns if the "avatar" field was cleared in this mutation.

func (*PlayerMutation) ClearAuthCode

func (m *PlayerMutation) ClearAuthCode()

ClearAuthCode clears the value of the "auth_code" field.

func (*PlayerMutation) ClearAvatar

func (m *PlayerMutation) ClearAvatar()

ClearAvatar clears the value of the "avatar" field.

func (*PlayerMutation) ClearEdge

func (m *PlayerMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PlayerMutation) ClearField

func (m *PlayerMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PlayerMutation) ClearGameBanCount

func (m *PlayerMutation) ClearGameBanCount()

ClearGameBanCount clears the value of the "game_ban_count" field.

func (*PlayerMutation) ClearGameBanDate

func (m *PlayerMutation) ClearGameBanDate()

ClearGameBanDate clears the value of the "game_ban_date" field.

func (*PlayerMutation) ClearLooses

func (m *PlayerMutation) ClearLooses()

ClearLooses clears the value of the "looses" field.

func (*PlayerMutation) ClearMatches

func (m *PlayerMutation) ClearMatches()

ClearMatches clears the "matches" edge to the Match entity.

func (*PlayerMutation) ClearName

func (m *PlayerMutation) ClearName()

ClearName clears the value of the "name" field.

func (*PlayerMutation) ClearOldestSharecodeSeen

func (m *PlayerMutation) ClearOldestSharecodeSeen()

ClearOldestSharecodeSeen clears the value of the "oldest_sharecode_seen" field.

func (*PlayerMutation) ClearProfileCreated

func (m *PlayerMutation) ClearProfileCreated()

ClearProfileCreated clears the value of the "profile_created" field.

func (*PlayerMutation) ClearSharecodeUpdated

func (m *PlayerMutation) ClearSharecodeUpdated()

ClearSharecodeUpdated clears the value of the "sharecode_updated" field.

func (*PlayerMutation) ClearStats

func (m *PlayerMutation) ClearStats()

ClearStats clears the "stats" edge to the MatchPlayer entity.

func (*PlayerMutation) ClearTies

func (m *PlayerMutation) ClearTies()

ClearTies clears the value of the "ties" field.

func (*PlayerMutation) ClearVacCount

func (m *PlayerMutation) ClearVacCount()

ClearVacCount clears the value of the "vac_count" field.

func (*PlayerMutation) ClearVacDate

func (m *PlayerMutation) ClearVacDate()

ClearVacDate clears the value of the "vac_date" field.

func (*PlayerMutation) ClearVanityURL

func (m *PlayerMutation) ClearVanityURL()

ClearVanityURL clears the value of the "vanity_url" field.

func (*PlayerMutation) ClearVanityURLReal

func (m *PlayerMutation) ClearVanityURLReal()

ClearVanityURLReal clears the value of the "vanity_url_real" field.

func (*PlayerMutation) ClearWins

func (m *PlayerMutation) ClearWins()

ClearWins clears the value of the "wins" field.

func (*PlayerMutation) ClearedEdges

func (m *PlayerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PlayerMutation) ClearedFields

func (m *PlayerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PlayerMutation) Client

func (m PlayerMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PlayerMutation) EdgeCleared

func (m *PlayerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PlayerMutation) Field

func (m *PlayerMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PlayerMutation) FieldCleared

func (m *PlayerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PlayerMutation) Fields

func (m *PlayerMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PlayerMutation) GameBanCount

func (m *PlayerMutation) GameBanCount() (r int, exists bool)

GameBanCount returns the value of the "game_ban_count" field in the mutation.

func (*PlayerMutation) GameBanCountCleared

func (m *PlayerMutation) GameBanCountCleared() bool

GameBanCountCleared returns if the "game_ban_count" field was cleared in this mutation.

func (*PlayerMutation) GameBanDate

func (m *PlayerMutation) GameBanDate() (r time.Time, exists bool)

GameBanDate returns the value of the "game_ban_date" field in the mutation.

func (*PlayerMutation) GameBanDateCleared

func (m *PlayerMutation) GameBanDateCleared() bool

GameBanDateCleared returns if the "game_ban_date" field was cleared in this mutation.

func (*PlayerMutation) ID

func (m *PlayerMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PlayerMutation) IDs

func (m *PlayerMutation) IDs(ctx context.Context) ([]uint64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PlayerMutation) Looses

func (m *PlayerMutation) Looses() (r int, exists bool)

Looses returns the value of the "looses" field in the mutation.

func (*PlayerMutation) LoosesCleared

func (m *PlayerMutation) LoosesCleared() bool

LoosesCleared returns if the "looses" field was cleared in this mutation.

func (*PlayerMutation) MatchesCleared

func (m *PlayerMutation) MatchesCleared() bool

MatchesCleared reports if the "matches" edge to the Match entity was cleared.

func (*PlayerMutation) MatchesIDs

func (m *PlayerMutation) MatchesIDs() (ids []uint64)

MatchesIDs returns the "matches" edge IDs in the mutation.

func (*PlayerMutation) Name

func (m *PlayerMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PlayerMutation) NameCleared

func (m *PlayerMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*PlayerMutation) OldAuthCode

func (m *PlayerMutation) OldAuthCode(ctx context.Context) (v string, err error)

OldAuthCode returns the old "auth_code" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldAvatar

func (m *PlayerMutation) OldAvatar(ctx context.Context) (v string, err error)

OldAvatar returns the old "avatar" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldField

func (m *PlayerMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PlayerMutation) OldGameBanCount

func (m *PlayerMutation) OldGameBanCount(ctx context.Context) (v int, err error)

OldGameBanCount returns the old "game_ban_count" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldGameBanDate

func (m *PlayerMutation) OldGameBanDate(ctx context.Context) (v time.Time, err error)

OldGameBanDate returns the old "game_ban_date" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldLooses

func (m *PlayerMutation) OldLooses(ctx context.Context) (v int, err error)

OldLooses returns the old "looses" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldName

func (m *PlayerMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldOldestSharecodeSeen

func (m *PlayerMutation) OldOldestSharecodeSeen(ctx context.Context) (v string, err error)

OldOldestSharecodeSeen returns the old "oldest_sharecode_seen" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldProfileCreated

func (m *PlayerMutation) OldProfileCreated(ctx context.Context) (v time.Time, err error)

OldProfileCreated returns the old "profile_created" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldSharecodeUpdated

func (m *PlayerMutation) OldSharecodeUpdated(ctx context.Context) (v time.Time, err error)

OldSharecodeUpdated returns the old "sharecode_updated" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldSteamUpdated

func (m *PlayerMutation) OldSteamUpdated(ctx context.Context) (v time.Time, err error)

OldSteamUpdated returns the old "steam_updated" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldTies

func (m *PlayerMutation) OldTies(ctx context.Context) (v int, err error)

OldTies returns the old "ties" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldVacCount

func (m *PlayerMutation) OldVacCount(ctx context.Context) (v int, err error)

OldVacCount returns the old "vac_count" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldVacDate

func (m *PlayerMutation) OldVacDate(ctx context.Context) (v time.Time, err error)

OldVacDate returns the old "vac_date" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldVanityURL

func (m *PlayerMutation) OldVanityURL(ctx context.Context) (v string, err error)

OldVanityURL returns the old "vanity_url" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldVanityURLReal

func (m *PlayerMutation) OldVanityURLReal(ctx context.Context) (v string, err error)

OldVanityURLReal returns the old "vanity_url_real" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldWins

func (m *PlayerMutation) OldWins(ctx context.Context) (v int, err error)

OldWins returns the old "wins" field's value of the Player entity. If the Player object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlayerMutation) OldestSharecodeSeen

func (m *PlayerMutation) OldestSharecodeSeen() (r string, exists bool)

OldestSharecodeSeen returns the value of the "oldest_sharecode_seen" field in the mutation.

func (*PlayerMutation) OldestSharecodeSeenCleared

func (m *PlayerMutation) OldestSharecodeSeenCleared() bool

OldestSharecodeSeenCleared returns if the "oldest_sharecode_seen" field was cleared in this mutation.

func (*PlayerMutation) Op

func (m *PlayerMutation) Op() Op

Op returns the operation name.

func (*PlayerMutation) ProfileCreated

func (m *PlayerMutation) ProfileCreated() (r time.Time, exists bool)

ProfileCreated returns the value of the "profile_created" field in the mutation.

func (*PlayerMutation) ProfileCreatedCleared

func (m *PlayerMutation) ProfileCreatedCleared() bool

ProfileCreatedCleared returns if the "profile_created" field was cleared in this mutation.

func (*PlayerMutation) RemoveMatchIDs

func (m *PlayerMutation) RemoveMatchIDs(ids ...uint64)

RemoveMatchIDs removes the "matches" edge to the Match entity by IDs.

func (*PlayerMutation) RemoveStatIDs

func (m *PlayerMutation) RemoveStatIDs(ids ...int)

RemoveStatIDs removes the "stats" edge to the MatchPlayer entity by IDs.

func (*PlayerMutation) RemovedEdges

func (m *PlayerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PlayerMutation) RemovedIDs

func (m *PlayerMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PlayerMutation) RemovedMatchesIDs

func (m *PlayerMutation) RemovedMatchesIDs() (ids []uint64)

RemovedMatches returns the removed IDs of the "matches" edge to the Match entity.

func (*PlayerMutation) RemovedStatsIDs

func (m *PlayerMutation) RemovedStatsIDs() (ids []int)

RemovedStats returns the removed IDs of the "stats" edge to the MatchPlayer entity.

func (*PlayerMutation) ResetAuthCode

func (m *PlayerMutation) ResetAuthCode()

ResetAuthCode resets all changes to the "auth_code" field.

func (*PlayerMutation) ResetAvatar

func (m *PlayerMutation) ResetAvatar()

ResetAvatar resets all changes to the "avatar" field.

func (*PlayerMutation) ResetEdge

func (m *PlayerMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PlayerMutation) ResetField

func (m *PlayerMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PlayerMutation) ResetGameBanCount

func (m *PlayerMutation) ResetGameBanCount()

ResetGameBanCount resets all changes to the "game_ban_count" field.

func (*PlayerMutation) ResetGameBanDate

func (m *PlayerMutation) ResetGameBanDate()

ResetGameBanDate resets all changes to the "game_ban_date" field.

func (*PlayerMutation) ResetLooses

func (m *PlayerMutation) ResetLooses()

ResetLooses resets all changes to the "looses" field.

func (*PlayerMutation) ResetMatches

func (m *PlayerMutation) ResetMatches()

ResetMatches resets all changes to the "matches" edge.

func (*PlayerMutation) ResetName

func (m *PlayerMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PlayerMutation) ResetOldestSharecodeSeen

func (m *PlayerMutation) ResetOldestSharecodeSeen()

ResetOldestSharecodeSeen resets all changes to the "oldest_sharecode_seen" field.

func (*PlayerMutation) ResetProfileCreated

func (m *PlayerMutation) ResetProfileCreated()

ResetProfileCreated resets all changes to the "profile_created" field.

func (*PlayerMutation) ResetSharecodeUpdated

func (m *PlayerMutation) ResetSharecodeUpdated()

ResetSharecodeUpdated resets all changes to the "sharecode_updated" field.

func (*PlayerMutation) ResetStats

func (m *PlayerMutation) ResetStats()

ResetStats resets all changes to the "stats" edge.

func (*PlayerMutation) ResetSteamUpdated

func (m *PlayerMutation) ResetSteamUpdated()

ResetSteamUpdated resets all changes to the "steam_updated" field.

func (*PlayerMutation) ResetTies

func (m *PlayerMutation) ResetTies()

ResetTies resets all changes to the "ties" field.

func (*PlayerMutation) ResetVacCount

func (m *PlayerMutation) ResetVacCount()

ResetVacCount resets all changes to the "vac_count" field.

func (*PlayerMutation) ResetVacDate

func (m *PlayerMutation) ResetVacDate()

ResetVacDate resets all changes to the "vac_date" field.

func (*PlayerMutation) ResetVanityURL

func (m *PlayerMutation) ResetVanityURL()

ResetVanityURL resets all changes to the "vanity_url" field.

func (*PlayerMutation) ResetVanityURLReal

func (m *PlayerMutation) ResetVanityURLReal()

ResetVanityURLReal resets all changes to the "vanity_url_real" field.

func (*PlayerMutation) ResetWins

func (m *PlayerMutation) ResetWins()

ResetWins resets all changes to the "wins" field.

func (*PlayerMutation) SetAuthCode

func (m *PlayerMutation) SetAuthCode(s string)

SetAuthCode sets the "auth_code" field.

func (*PlayerMutation) SetAvatar

func (m *PlayerMutation) SetAvatar(s string)

SetAvatar sets the "avatar" field.

func (*PlayerMutation) SetField

func (m *PlayerMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PlayerMutation) SetGameBanCount

func (m *PlayerMutation) SetGameBanCount(i int)

SetGameBanCount sets the "game_ban_count" field.

func (*PlayerMutation) SetGameBanDate

func (m *PlayerMutation) SetGameBanDate(t time.Time)

SetGameBanDate sets the "game_ban_date" field.

func (*PlayerMutation) SetID

func (m *PlayerMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Player entities.

func (*PlayerMutation) SetLooses

func (m *PlayerMutation) SetLooses(i int)

SetLooses sets the "looses" field.

func (*PlayerMutation) SetName

func (m *PlayerMutation) SetName(s string)

SetName sets the "name" field.

func (*PlayerMutation) SetOldestSharecodeSeen

func (m *PlayerMutation) SetOldestSharecodeSeen(s string)

SetOldestSharecodeSeen sets the "oldest_sharecode_seen" field.

func (*PlayerMutation) SetProfileCreated

func (m *PlayerMutation) SetProfileCreated(t time.Time)

SetProfileCreated sets the "profile_created" field.

func (*PlayerMutation) SetSharecodeUpdated

func (m *PlayerMutation) SetSharecodeUpdated(t time.Time)

SetSharecodeUpdated sets the "sharecode_updated" field.

func (*PlayerMutation) SetSteamUpdated

func (m *PlayerMutation) SetSteamUpdated(t time.Time)

SetSteamUpdated sets the "steam_updated" field.

func (*PlayerMutation) SetTies

func (m *PlayerMutation) SetTies(i int)

SetTies sets the "ties" field.

func (*PlayerMutation) SetVacCount

func (m *PlayerMutation) SetVacCount(i int)

SetVacCount sets the "vac_count" field.

func (*PlayerMutation) SetVacDate

func (m *PlayerMutation) SetVacDate(t time.Time)

SetVacDate sets the "vac_date" field.

func (*PlayerMutation) SetVanityURL

func (m *PlayerMutation) SetVanityURL(s string)

SetVanityURL sets the "vanity_url" field.

func (*PlayerMutation) SetVanityURLReal

func (m *PlayerMutation) SetVanityURLReal(s string)

SetVanityURLReal sets the "vanity_url_real" field.

func (*PlayerMutation) SetWins

func (m *PlayerMutation) SetWins(i int)

SetWins sets the "wins" field.

func (*PlayerMutation) SharecodeUpdated

func (m *PlayerMutation) SharecodeUpdated() (r time.Time, exists bool)

SharecodeUpdated returns the value of the "sharecode_updated" field in the mutation.

func (*PlayerMutation) SharecodeUpdatedCleared

func (m *PlayerMutation) SharecodeUpdatedCleared() bool

SharecodeUpdatedCleared returns if the "sharecode_updated" field was cleared in this mutation.

func (*PlayerMutation) StatsCleared

func (m *PlayerMutation) StatsCleared() bool

StatsCleared reports if the "stats" edge to the MatchPlayer entity was cleared.

func (*PlayerMutation) StatsIDs

func (m *PlayerMutation) StatsIDs() (ids []int)

StatsIDs returns the "stats" edge IDs in the mutation.

func (*PlayerMutation) SteamUpdated

func (m *PlayerMutation) SteamUpdated() (r time.Time, exists bool)

SteamUpdated returns the value of the "steam_updated" field in the mutation.

func (*PlayerMutation) Ties

func (m *PlayerMutation) Ties() (r int, exists bool)

Ties returns the value of the "ties" field in the mutation.

func (*PlayerMutation) TiesCleared

func (m *PlayerMutation) TiesCleared() bool

TiesCleared returns if the "ties" field was cleared in this mutation.

func (PlayerMutation) Tx

func (m PlayerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PlayerMutation) Type

func (m *PlayerMutation) Type() string

Type returns the node type of this mutation (Player).

func (*PlayerMutation) VacCount

func (m *PlayerMutation) VacCount() (r int, exists bool)

VacCount returns the value of the "vac_count" field in the mutation.

func (*PlayerMutation) VacCountCleared

func (m *PlayerMutation) VacCountCleared() bool

VacCountCleared returns if the "vac_count" field was cleared in this mutation.

func (*PlayerMutation) VacDate

func (m *PlayerMutation) VacDate() (r time.Time, exists bool)

VacDate returns the value of the "vac_date" field in the mutation.

func (*PlayerMutation) VacDateCleared

func (m *PlayerMutation) VacDateCleared() bool

VacDateCleared returns if the "vac_date" field was cleared in this mutation.

func (*PlayerMutation) VanityURL

func (m *PlayerMutation) VanityURL() (r string, exists bool)

VanityURL returns the value of the "vanity_url" field in the mutation.

func (*PlayerMutation) VanityURLCleared

func (m *PlayerMutation) VanityURLCleared() bool

VanityURLCleared returns if the "vanity_url" field was cleared in this mutation.

func (*PlayerMutation) VanityURLReal

func (m *PlayerMutation) VanityURLReal() (r string, exists bool)

VanityURLReal returns the value of the "vanity_url_real" field in the mutation.

func (*PlayerMutation) VanityURLRealCleared

func (m *PlayerMutation) VanityURLRealCleared() bool

VanityURLRealCleared returns if the "vanity_url_real" field was cleared in this mutation.

func (*PlayerMutation) Where

func (m *PlayerMutation) Where(ps ...predicate.Player)

Where appends a list predicates to the PlayerMutation builder.

func (*PlayerMutation) Wins

func (m *PlayerMutation) Wins() (r int, exists bool)

Wins returns the value of the "wins" field in the mutation.

func (*PlayerMutation) WinsCleared

func (m *PlayerMutation) WinsCleared() bool

WinsCleared returns if the "wins" field was cleared in this mutation.

type PlayerQuery

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

PlayerQuery is the builder for querying Player entities.

func (*PlayerQuery) All

func (pq *PlayerQuery) All(ctx context.Context) ([]*Player, error)

All executes the query and returns a list of Players.

func (*PlayerQuery) AllX

func (pq *PlayerQuery) AllX(ctx context.Context) []*Player

AllX is like All, but panics if an error occurs.

func (*PlayerQuery) Clone

func (pq *PlayerQuery) Clone() *PlayerQuery

Clone returns a duplicate of the PlayerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PlayerQuery) Count

func (pq *PlayerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PlayerQuery) CountX

func (pq *PlayerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PlayerQuery) Exist

func (pq *PlayerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PlayerQuery) ExistX

func (pq *PlayerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PlayerQuery) First

func (pq *PlayerQuery) First(ctx context.Context) (*Player, error)

First returns the first Player entity from the query. Returns a *NotFoundError when no Player was found.

func (*PlayerQuery) FirstID

func (pq *PlayerQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first Player ID from the query. Returns a *NotFoundError when no Player ID was found.

func (*PlayerQuery) FirstIDX

func (pq *PlayerQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*PlayerQuery) FirstX

func (pq *PlayerQuery) FirstX(ctx context.Context) *Player

FirstX is like First, but panics if an error occurs.

func (*PlayerQuery) GroupBy

func (pq *PlayerQuery) GroupBy(field string, fields ...string) *PlayerGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Player.Query().
	GroupBy(player.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PlayerQuery) IDs

func (pq *PlayerQuery) IDs(ctx context.Context) ([]uint64, error)

IDs executes the query and returns a list of Player IDs.

func (*PlayerQuery) IDsX

func (pq *PlayerQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*PlayerQuery) Limit

func (pq *PlayerQuery) Limit(limit int) *PlayerQuery

Limit adds a limit step to the query.

func (*PlayerQuery) Modify

func (pq *PlayerQuery) Modify(modifiers ...func(s *sql.Selector)) *PlayerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PlayerQuery) Offset

func (pq *PlayerQuery) Offset(offset int) *PlayerQuery

Offset adds an offset step to the query.

func (*PlayerQuery) Only

func (pq *PlayerQuery) Only(ctx context.Context) (*Player, error)

Only returns a single Player entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Player entity is found. Returns a *NotFoundError when no Player entities are found.

func (*PlayerQuery) OnlyID

func (pq *PlayerQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only Player ID in the query. Returns a *NotSingularError when more than one Player ID is found. Returns a *NotFoundError when no entities are found.

func (*PlayerQuery) OnlyIDX

func (pq *PlayerQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PlayerQuery) OnlyX

func (pq *PlayerQuery) OnlyX(ctx context.Context) *Player

OnlyX is like Only, but panics if an error occurs.

func (*PlayerQuery) Order

func (pq *PlayerQuery) Order(o ...OrderFunc) *PlayerQuery

Order adds an order step to the query.

func (*PlayerQuery) QueryMatches

func (pq *PlayerQuery) QueryMatches() *MatchQuery

QueryMatches chains the current query on the "matches" edge.

func (*PlayerQuery) QueryStats

func (pq *PlayerQuery) QueryStats() *MatchPlayerQuery

QueryStats chains the current query on the "stats" edge.

func (*PlayerQuery) Select

func (pq *PlayerQuery) Select(fields ...string) *PlayerSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Player.Query().
	Select(player.FieldName).
	Scan(ctx, &v)

func (*PlayerQuery) Unique

func (pq *PlayerQuery) Unique(unique bool) *PlayerQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PlayerQuery) Where

func (pq *PlayerQuery) Where(ps ...predicate.Player) *PlayerQuery

Where adds a new predicate for the PlayerQuery builder.

func (*PlayerQuery) WithMatches

func (pq *PlayerQuery) WithMatches(opts ...func(*MatchQuery)) *PlayerQuery

WithMatches tells the query-builder to eager-load the nodes that are connected to the "matches" edge. The optional arguments are used to configure the query builder of the edge.

func (*PlayerQuery) WithStats

func (pq *PlayerQuery) WithStats(opts ...func(*MatchPlayerQuery)) *PlayerQuery

WithStats tells the query-builder to eager-load the nodes that are connected to the "stats" edge. The optional arguments are used to configure the query builder of the edge.

type PlayerSelect

type PlayerSelect struct {
	*PlayerQuery
	// contains filtered or unexported fields
}

PlayerSelect is the builder for selecting fields of Player entities.

func (*PlayerSelect) Bool

func (s *PlayerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) BoolX

func (s *PlayerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PlayerSelect) Bools

func (s *PlayerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) BoolsX

func (s *PlayerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PlayerSelect) Float64

func (s *PlayerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) Float64X

func (s *PlayerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PlayerSelect) Float64s

func (s *PlayerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) Float64sX

func (s *PlayerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PlayerSelect) Int

func (s *PlayerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) IntX

func (s *PlayerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PlayerSelect) Ints

func (s *PlayerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) IntsX

func (s *PlayerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PlayerSelect) Modify

func (ps *PlayerSelect) Modify(modifiers ...func(s *sql.Selector)) *PlayerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PlayerSelect) Scan

func (ps *PlayerSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*PlayerSelect) ScanX

func (s *PlayerSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PlayerSelect) String

func (s *PlayerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) StringX

func (s *PlayerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PlayerSelect) Strings

func (s *PlayerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PlayerSelect) StringsX

func (s *PlayerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PlayerUpdate

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

PlayerUpdate is the builder for updating Player entities.

func (*PlayerUpdate) AddGameBanCount

func (pu *PlayerUpdate) AddGameBanCount(i int) *PlayerUpdate

AddGameBanCount adds i to the "game_ban_count" field.

func (*PlayerUpdate) AddLooses

func (pu *PlayerUpdate) AddLooses(i int) *PlayerUpdate

AddLooses adds i to the "looses" field.

func (*PlayerUpdate) AddMatchIDs

func (pu *PlayerUpdate) AddMatchIDs(ids ...uint64) *PlayerUpdate

AddMatchIDs adds the "matches" edge to the Match entity by IDs.

func (*PlayerUpdate) AddMatches

func (pu *PlayerUpdate) AddMatches(m ...*Match) *PlayerUpdate

AddMatches adds the "matches" edges to the Match entity.

func (*PlayerUpdate) AddStatIDs

func (pu *PlayerUpdate) AddStatIDs(ids ...int) *PlayerUpdate

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*PlayerUpdate) AddStats

func (pu *PlayerUpdate) AddStats(m ...*MatchPlayer) *PlayerUpdate

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*PlayerUpdate) AddTies

func (pu *PlayerUpdate) AddTies(i int) *PlayerUpdate

AddTies adds i to the "ties" field.

func (*PlayerUpdate) AddVacCount

func (pu *PlayerUpdate) AddVacCount(i int) *PlayerUpdate

AddVacCount adds i to the "vac_count" field.

func (*PlayerUpdate) AddWins

func (pu *PlayerUpdate) AddWins(i int) *PlayerUpdate

AddWins adds i to the "wins" field.

func (*PlayerUpdate) ClearAuthCode

func (pu *PlayerUpdate) ClearAuthCode() *PlayerUpdate

ClearAuthCode clears the value of the "auth_code" field.

func (*PlayerUpdate) ClearAvatar

func (pu *PlayerUpdate) ClearAvatar() *PlayerUpdate

ClearAvatar clears the value of the "avatar" field.

func (*PlayerUpdate) ClearGameBanCount

func (pu *PlayerUpdate) ClearGameBanCount() *PlayerUpdate

ClearGameBanCount clears the value of the "game_ban_count" field.

func (*PlayerUpdate) ClearGameBanDate

func (pu *PlayerUpdate) ClearGameBanDate() *PlayerUpdate

ClearGameBanDate clears the value of the "game_ban_date" field.

func (*PlayerUpdate) ClearLooses

func (pu *PlayerUpdate) ClearLooses() *PlayerUpdate

ClearLooses clears the value of the "looses" field.

func (*PlayerUpdate) ClearMatches

func (pu *PlayerUpdate) ClearMatches() *PlayerUpdate

ClearMatches clears all "matches" edges to the Match entity.

func (*PlayerUpdate) ClearName

func (pu *PlayerUpdate) ClearName() *PlayerUpdate

ClearName clears the value of the "name" field.

func (*PlayerUpdate) ClearOldestSharecodeSeen

func (pu *PlayerUpdate) ClearOldestSharecodeSeen() *PlayerUpdate

ClearOldestSharecodeSeen clears the value of the "oldest_sharecode_seen" field.

func (*PlayerUpdate) ClearProfileCreated

func (pu *PlayerUpdate) ClearProfileCreated() *PlayerUpdate

ClearProfileCreated clears the value of the "profile_created" field.

func (*PlayerUpdate) ClearSharecodeUpdated

func (pu *PlayerUpdate) ClearSharecodeUpdated() *PlayerUpdate

ClearSharecodeUpdated clears the value of the "sharecode_updated" field.

func (*PlayerUpdate) ClearStats

func (pu *PlayerUpdate) ClearStats() *PlayerUpdate

ClearStats clears all "stats" edges to the MatchPlayer entity.

func (*PlayerUpdate) ClearTies

func (pu *PlayerUpdate) ClearTies() *PlayerUpdate

ClearTies clears the value of the "ties" field.

func (*PlayerUpdate) ClearVacCount

func (pu *PlayerUpdate) ClearVacCount() *PlayerUpdate

ClearVacCount clears the value of the "vac_count" field.

func (*PlayerUpdate) ClearVacDate

func (pu *PlayerUpdate) ClearVacDate() *PlayerUpdate

ClearVacDate clears the value of the "vac_date" field.

func (*PlayerUpdate) ClearVanityURL

func (pu *PlayerUpdate) ClearVanityURL() *PlayerUpdate

ClearVanityURL clears the value of the "vanity_url" field.

func (*PlayerUpdate) ClearVanityURLReal

func (pu *PlayerUpdate) ClearVanityURLReal() *PlayerUpdate

ClearVanityURLReal clears the value of the "vanity_url_real" field.

func (*PlayerUpdate) ClearWins

func (pu *PlayerUpdate) ClearWins() *PlayerUpdate

ClearWins clears the value of the "wins" field.

func (*PlayerUpdate) Exec

func (pu *PlayerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlayerUpdate) ExecX

func (pu *PlayerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlayerUpdate) Modify

func (pu *PlayerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PlayerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PlayerUpdate) Mutation

func (pu *PlayerUpdate) Mutation() *PlayerMutation

Mutation returns the PlayerMutation object of the builder.

func (*PlayerUpdate) RemoveMatchIDs

func (pu *PlayerUpdate) RemoveMatchIDs(ids ...uint64) *PlayerUpdate

RemoveMatchIDs removes the "matches" edge to Match entities by IDs.

func (*PlayerUpdate) RemoveMatches

func (pu *PlayerUpdate) RemoveMatches(m ...*Match) *PlayerUpdate

RemoveMatches removes "matches" edges to Match entities.

func (*PlayerUpdate) RemoveStatIDs

func (pu *PlayerUpdate) RemoveStatIDs(ids ...int) *PlayerUpdate

RemoveStatIDs removes the "stats" edge to MatchPlayer entities by IDs.

func (*PlayerUpdate) RemoveStats

func (pu *PlayerUpdate) RemoveStats(m ...*MatchPlayer) *PlayerUpdate

RemoveStats removes "stats" edges to MatchPlayer entities.

func (*PlayerUpdate) Save

func (pu *PlayerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PlayerUpdate) SaveX

func (pu *PlayerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PlayerUpdate) SetAuthCode

func (pu *PlayerUpdate) SetAuthCode(s string) *PlayerUpdate

SetAuthCode sets the "auth_code" field.

func (*PlayerUpdate) SetAvatar

func (pu *PlayerUpdate) SetAvatar(s string) *PlayerUpdate

SetAvatar sets the "avatar" field.

func (*PlayerUpdate) SetGameBanCount

func (pu *PlayerUpdate) SetGameBanCount(i int) *PlayerUpdate

SetGameBanCount sets the "game_ban_count" field.

func (*PlayerUpdate) SetGameBanDate

func (pu *PlayerUpdate) SetGameBanDate(t time.Time) *PlayerUpdate

SetGameBanDate sets the "game_ban_date" field.

func (*PlayerUpdate) SetLooses

func (pu *PlayerUpdate) SetLooses(i int) *PlayerUpdate

SetLooses sets the "looses" field.

func (*PlayerUpdate) SetName

func (pu *PlayerUpdate) SetName(s string) *PlayerUpdate

SetName sets the "name" field.

func (*PlayerUpdate) SetNillableAuthCode

func (pu *PlayerUpdate) SetNillableAuthCode(s *string) *PlayerUpdate

SetNillableAuthCode sets the "auth_code" field if the given value is not nil.

func (*PlayerUpdate) SetNillableAvatar

func (pu *PlayerUpdate) SetNillableAvatar(s *string) *PlayerUpdate

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*PlayerUpdate) SetNillableGameBanCount

func (pu *PlayerUpdate) SetNillableGameBanCount(i *int) *PlayerUpdate

SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.

func (*PlayerUpdate) SetNillableGameBanDate

func (pu *PlayerUpdate) SetNillableGameBanDate(t *time.Time) *PlayerUpdate

SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.

func (*PlayerUpdate) SetNillableLooses

func (pu *PlayerUpdate) SetNillableLooses(i *int) *PlayerUpdate

SetNillableLooses sets the "looses" field if the given value is not nil.

func (*PlayerUpdate) SetNillableName

func (pu *PlayerUpdate) SetNillableName(s *string) *PlayerUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*PlayerUpdate) SetNillableOldestSharecodeSeen

func (pu *PlayerUpdate) SetNillableOldestSharecodeSeen(s *string) *PlayerUpdate

SetNillableOldestSharecodeSeen sets the "oldest_sharecode_seen" field if the given value is not nil.

func (*PlayerUpdate) SetNillableProfileCreated

func (pu *PlayerUpdate) SetNillableProfileCreated(t *time.Time) *PlayerUpdate

SetNillableProfileCreated sets the "profile_created" field if the given value is not nil.

func (*PlayerUpdate) SetNillableSharecodeUpdated

func (pu *PlayerUpdate) SetNillableSharecodeUpdated(t *time.Time) *PlayerUpdate

SetNillableSharecodeUpdated sets the "sharecode_updated" field if the given value is not nil.

func (*PlayerUpdate) SetNillableSteamUpdated

func (pu *PlayerUpdate) SetNillableSteamUpdated(t *time.Time) *PlayerUpdate

SetNillableSteamUpdated sets the "steam_updated" field if the given value is not nil.

func (*PlayerUpdate) SetNillableTies

func (pu *PlayerUpdate) SetNillableTies(i *int) *PlayerUpdate

SetNillableTies sets the "ties" field if the given value is not nil.

func (*PlayerUpdate) SetNillableVacCount

func (pu *PlayerUpdate) SetNillableVacCount(i *int) *PlayerUpdate

SetNillableVacCount sets the "vac_count" field if the given value is not nil.

func (*PlayerUpdate) SetNillableVacDate

func (pu *PlayerUpdate) SetNillableVacDate(t *time.Time) *PlayerUpdate

SetNillableVacDate sets the "vac_date" field if the given value is not nil.

func (*PlayerUpdate) SetNillableVanityURL

func (pu *PlayerUpdate) SetNillableVanityURL(s *string) *PlayerUpdate

SetNillableVanityURL sets the "vanity_url" field if the given value is not nil.

func (*PlayerUpdate) SetNillableVanityURLReal

func (pu *PlayerUpdate) SetNillableVanityURLReal(s *string) *PlayerUpdate

SetNillableVanityURLReal sets the "vanity_url_real" field if the given value is not nil.

func (*PlayerUpdate) SetNillableWins

func (pu *PlayerUpdate) SetNillableWins(i *int) *PlayerUpdate

SetNillableWins sets the "wins" field if the given value is not nil.

func (*PlayerUpdate) SetOldestSharecodeSeen

func (pu *PlayerUpdate) SetOldestSharecodeSeen(s string) *PlayerUpdate

SetOldestSharecodeSeen sets the "oldest_sharecode_seen" field.

func (*PlayerUpdate) SetProfileCreated

func (pu *PlayerUpdate) SetProfileCreated(t time.Time) *PlayerUpdate

SetProfileCreated sets the "profile_created" field.

func (*PlayerUpdate) SetSharecodeUpdated

func (pu *PlayerUpdate) SetSharecodeUpdated(t time.Time) *PlayerUpdate

SetSharecodeUpdated sets the "sharecode_updated" field.

func (*PlayerUpdate) SetSteamUpdated

func (pu *PlayerUpdate) SetSteamUpdated(t time.Time) *PlayerUpdate

SetSteamUpdated sets the "steam_updated" field.

func (*PlayerUpdate) SetTies

func (pu *PlayerUpdate) SetTies(i int) *PlayerUpdate

SetTies sets the "ties" field.

func (*PlayerUpdate) SetVacCount

func (pu *PlayerUpdate) SetVacCount(i int) *PlayerUpdate

SetVacCount sets the "vac_count" field.

func (*PlayerUpdate) SetVacDate

func (pu *PlayerUpdate) SetVacDate(t time.Time) *PlayerUpdate

SetVacDate sets the "vac_date" field.

func (*PlayerUpdate) SetVanityURL

func (pu *PlayerUpdate) SetVanityURL(s string) *PlayerUpdate

SetVanityURL sets the "vanity_url" field.

func (*PlayerUpdate) SetVanityURLReal

func (pu *PlayerUpdate) SetVanityURLReal(s string) *PlayerUpdate

SetVanityURLReal sets the "vanity_url_real" field.

func (*PlayerUpdate) SetWins

func (pu *PlayerUpdate) SetWins(i int) *PlayerUpdate

SetWins sets the "wins" field.

func (*PlayerUpdate) Where

func (pu *PlayerUpdate) Where(ps ...predicate.Player) *PlayerUpdate

Where appends a list predicates to the PlayerUpdate builder.

type PlayerUpdateOne

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

PlayerUpdateOne is the builder for updating a single Player entity.

func (*PlayerUpdateOne) AddGameBanCount

func (puo *PlayerUpdateOne) AddGameBanCount(i int) *PlayerUpdateOne

AddGameBanCount adds i to the "game_ban_count" field.

func (*PlayerUpdateOne) AddLooses

func (puo *PlayerUpdateOne) AddLooses(i int) *PlayerUpdateOne

AddLooses adds i to the "looses" field.

func (*PlayerUpdateOne) AddMatchIDs

func (puo *PlayerUpdateOne) AddMatchIDs(ids ...uint64) *PlayerUpdateOne

AddMatchIDs adds the "matches" edge to the Match entity by IDs.

func (*PlayerUpdateOne) AddMatches

func (puo *PlayerUpdateOne) AddMatches(m ...*Match) *PlayerUpdateOne

AddMatches adds the "matches" edges to the Match entity.

func (*PlayerUpdateOne) AddStatIDs

func (puo *PlayerUpdateOne) AddStatIDs(ids ...int) *PlayerUpdateOne

AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.

func (*PlayerUpdateOne) AddStats

func (puo *PlayerUpdateOne) AddStats(m ...*MatchPlayer) *PlayerUpdateOne

AddStats adds the "stats" edges to the MatchPlayer entity.

func (*PlayerUpdateOne) AddTies

func (puo *PlayerUpdateOne) AddTies(i int) *PlayerUpdateOne

AddTies adds i to the "ties" field.

func (*PlayerUpdateOne) AddVacCount

func (puo *PlayerUpdateOne) AddVacCount(i int) *PlayerUpdateOne

AddVacCount adds i to the "vac_count" field.

func (*PlayerUpdateOne) AddWins

func (puo *PlayerUpdateOne) AddWins(i int) *PlayerUpdateOne

AddWins adds i to the "wins" field.

func (*PlayerUpdateOne) ClearAuthCode

func (puo *PlayerUpdateOne) ClearAuthCode() *PlayerUpdateOne

ClearAuthCode clears the value of the "auth_code" field.

func (*PlayerUpdateOne) ClearAvatar

func (puo *PlayerUpdateOne) ClearAvatar() *PlayerUpdateOne

ClearAvatar clears the value of the "avatar" field.

func (*PlayerUpdateOne) ClearGameBanCount

func (puo *PlayerUpdateOne) ClearGameBanCount() *PlayerUpdateOne

ClearGameBanCount clears the value of the "game_ban_count" field.

func (*PlayerUpdateOne) ClearGameBanDate

func (puo *PlayerUpdateOne) ClearGameBanDate() *PlayerUpdateOne

ClearGameBanDate clears the value of the "game_ban_date" field.

func (*PlayerUpdateOne) ClearLooses

func (puo *PlayerUpdateOne) ClearLooses() *PlayerUpdateOne

ClearLooses clears the value of the "looses" field.

func (*PlayerUpdateOne) ClearMatches

func (puo *PlayerUpdateOne) ClearMatches() *PlayerUpdateOne

ClearMatches clears all "matches" edges to the Match entity.

func (*PlayerUpdateOne) ClearName

func (puo *PlayerUpdateOne) ClearName() *PlayerUpdateOne

ClearName clears the value of the "name" field.

func (*PlayerUpdateOne) ClearOldestSharecodeSeen

func (puo *PlayerUpdateOne) ClearOldestSharecodeSeen() *PlayerUpdateOne

ClearOldestSharecodeSeen clears the value of the "oldest_sharecode_seen" field.

func (*PlayerUpdateOne) ClearProfileCreated

func (puo *PlayerUpdateOne) ClearProfileCreated() *PlayerUpdateOne

ClearProfileCreated clears the value of the "profile_created" field.

func (*PlayerUpdateOne) ClearSharecodeUpdated

func (puo *PlayerUpdateOne) ClearSharecodeUpdated() *PlayerUpdateOne

ClearSharecodeUpdated clears the value of the "sharecode_updated" field.

func (*PlayerUpdateOne) ClearStats

func (puo *PlayerUpdateOne) ClearStats() *PlayerUpdateOne

ClearStats clears all "stats" edges to the MatchPlayer entity.

func (*PlayerUpdateOne) ClearTies

func (puo *PlayerUpdateOne) ClearTies() *PlayerUpdateOne

ClearTies clears the value of the "ties" field.

func (*PlayerUpdateOne) ClearVacCount

func (puo *PlayerUpdateOne) ClearVacCount() *PlayerUpdateOne

ClearVacCount clears the value of the "vac_count" field.

func (*PlayerUpdateOne) ClearVacDate

func (puo *PlayerUpdateOne) ClearVacDate() *PlayerUpdateOne

ClearVacDate clears the value of the "vac_date" field.

func (*PlayerUpdateOne) ClearVanityURL

func (puo *PlayerUpdateOne) ClearVanityURL() *PlayerUpdateOne

ClearVanityURL clears the value of the "vanity_url" field.

func (*PlayerUpdateOne) ClearVanityURLReal

func (puo *PlayerUpdateOne) ClearVanityURLReal() *PlayerUpdateOne

ClearVanityURLReal clears the value of the "vanity_url_real" field.

func (*PlayerUpdateOne) ClearWins

func (puo *PlayerUpdateOne) ClearWins() *PlayerUpdateOne

ClearWins clears the value of the "wins" field.

func (*PlayerUpdateOne) Exec

func (puo *PlayerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PlayerUpdateOne) ExecX

func (puo *PlayerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlayerUpdateOne) Modify

func (puo *PlayerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PlayerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PlayerUpdateOne) Mutation

func (puo *PlayerUpdateOne) Mutation() *PlayerMutation

Mutation returns the PlayerMutation object of the builder.

func (*PlayerUpdateOne) RemoveMatchIDs

func (puo *PlayerUpdateOne) RemoveMatchIDs(ids ...uint64) *PlayerUpdateOne

RemoveMatchIDs removes the "matches" edge to Match entities by IDs.

func (*PlayerUpdateOne) RemoveMatches

func (puo *PlayerUpdateOne) RemoveMatches(m ...*Match) *PlayerUpdateOne

RemoveMatches removes "matches" edges to Match entities.

func (*PlayerUpdateOne) RemoveStatIDs

func (puo *PlayerUpdateOne) RemoveStatIDs(ids ...int) *PlayerUpdateOne

RemoveStatIDs removes the "stats" edge to MatchPlayer entities by IDs.

func (*PlayerUpdateOne) RemoveStats

func (puo *PlayerUpdateOne) RemoveStats(m ...*MatchPlayer) *PlayerUpdateOne

RemoveStats removes "stats" edges to MatchPlayer entities.

func (*PlayerUpdateOne) Save

func (puo *PlayerUpdateOne) Save(ctx context.Context) (*Player, error)

Save executes the query and returns the updated Player entity.

func (*PlayerUpdateOne) SaveX

func (puo *PlayerUpdateOne) SaveX(ctx context.Context) *Player

SaveX is like Save, but panics if an error occurs.

func (*PlayerUpdateOne) Select

func (puo *PlayerUpdateOne) Select(field string, fields ...string) *PlayerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PlayerUpdateOne) SetAuthCode

func (puo *PlayerUpdateOne) SetAuthCode(s string) *PlayerUpdateOne

SetAuthCode sets the "auth_code" field.

func (*PlayerUpdateOne) SetAvatar

func (puo *PlayerUpdateOne) SetAvatar(s string) *PlayerUpdateOne

SetAvatar sets the "avatar" field.

func (*PlayerUpdateOne) SetGameBanCount

func (puo *PlayerUpdateOne) SetGameBanCount(i int) *PlayerUpdateOne

SetGameBanCount sets the "game_ban_count" field.

func (*PlayerUpdateOne) SetGameBanDate

func (puo *PlayerUpdateOne) SetGameBanDate(t time.Time) *PlayerUpdateOne

SetGameBanDate sets the "game_ban_date" field.

func (*PlayerUpdateOne) SetLooses

func (puo *PlayerUpdateOne) SetLooses(i int) *PlayerUpdateOne

SetLooses sets the "looses" field.

func (*PlayerUpdateOne) SetName

func (puo *PlayerUpdateOne) SetName(s string) *PlayerUpdateOne

SetName sets the "name" field.

func (*PlayerUpdateOne) SetNillableAuthCode

func (puo *PlayerUpdateOne) SetNillableAuthCode(s *string) *PlayerUpdateOne

SetNillableAuthCode sets the "auth_code" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableAvatar

func (puo *PlayerUpdateOne) SetNillableAvatar(s *string) *PlayerUpdateOne

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableGameBanCount

func (puo *PlayerUpdateOne) SetNillableGameBanCount(i *int) *PlayerUpdateOne

SetNillableGameBanCount sets the "game_ban_count" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableGameBanDate

func (puo *PlayerUpdateOne) SetNillableGameBanDate(t *time.Time) *PlayerUpdateOne

SetNillableGameBanDate sets the "game_ban_date" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableLooses

func (puo *PlayerUpdateOne) SetNillableLooses(i *int) *PlayerUpdateOne

SetNillableLooses sets the "looses" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableName

func (puo *PlayerUpdateOne) SetNillableName(s *string) *PlayerUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableOldestSharecodeSeen

func (puo *PlayerUpdateOne) SetNillableOldestSharecodeSeen(s *string) *PlayerUpdateOne

SetNillableOldestSharecodeSeen sets the "oldest_sharecode_seen" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableProfileCreated

func (puo *PlayerUpdateOne) SetNillableProfileCreated(t *time.Time) *PlayerUpdateOne

SetNillableProfileCreated sets the "profile_created" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableSharecodeUpdated

func (puo *PlayerUpdateOne) SetNillableSharecodeUpdated(t *time.Time) *PlayerUpdateOne

SetNillableSharecodeUpdated sets the "sharecode_updated" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableSteamUpdated

func (puo *PlayerUpdateOne) SetNillableSteamUpdated(t *time.Time) *PlayerUpdateOne

SetNillableSteamUpdated sets the "steam_updated" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableTies

func (puo *PlayerUpdateOne) SetNillableTies(i *int) *PlayerUpdateOne

SetNillableTies sets the "ties" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableVacCount

func (puo *PlayerUpdateOne) SetNillableVacCount(i *int) *PlayerUpdateOne

SetNillableVacCount sets the "vac_count" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableVacDate

func (puo *PlayerUpdateOne) SetNillableVacDate(t *time.Time) *PlayerUpdateOne

SetNillableVacDate sets the "vac_date" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableVanityURL

func (puo *PlayerUpdateOne) SetNillableVanityURL(s *string) *PlayerUpdateOne

SetNillableVanityURL sets the "vanity_url" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableVanityURLReal

func (puo *PlayerUpdateOne) SetNillableVanityURLReal(s *string) *PlayerUpdateOne

SetNillableVanityURLReal sets the "vanity_url_real" field if the given value is not nil.

func (*PlayerUpdateOne) SetNillableWins

func (puo *PlayerUpdateOne) SetNillableWins(i *int) *PlayerUpdateOne

SetNillableWins sets the "wins" field if the given value is not nil.

func (*PlayerUpdateOne) SetOldestSharecodeSeen

func (puo *PlayerUpdateOne) SetOldestSharecodeSeen(s string) *PlayerUpdateOne

SetOldestSharecodeSeen sets the "oldest_sharecode_seen" field.

func (*PlayerUpdateOne) SetProfileCreated

func (puo *PlayerUpdateOne) SetProfileCreated(t time.Time) *PlayerUpdateOne

SetProfileCreated sets the "profile_created" field.

func (*PlayerUpdateOne) SetSharecodeUpdated

func (puo *PlayerUpdateOne) SetSharecodeUpdated(t time.Time) *PlayerUpdateOne

SetSharecodeUpdated sets the "sharecode_updated" field.

func (*PlayerUpdateOne) SetSteamUpdated

func (puo *PlayerUpdateOne) SetSteamUpdated(t time.Time) *PlayerUpdateOne

SetSteamUpdated sets the "steam_updated" field.

func (*PlayerUpdateOne) SetTies

func (puo *PlayerUpdateOne) SetTies(i int) *PlayerUpdateOne

SetTies sets the "ties" field.

func (*PlayerUpdateOne) SetVacCount

func (puo *PlayerUpdateOne) SetVacCount(i int) *PlayerUpdateOne

SetVacCount sets the "vac_count" field.

func (*PlayerUpdateOne) SetVacDate

func (puo *PlayerUpdateOne) SetVacDate(t time.Time) *PlayerUpdateOne

SetVacDate sets the "vac_date" field.

func (*PlayerUpdateOne) SetVanityURL

func (puo *PlayerUpdateOne) SetVanityURL(s string) *PlayerUpdateOne

SetVanityURL sets the "vanity_url" field.

func (*PlayerUpdateOne) SetVanityURLReal

func (puo *PlayerUpdateOne) SetVanityURLReal(s string) *PlayerUpdateOne

SetVanityURLReal sets the "vanity_url_real" field.

func (*PlayerUpdateOne) SetWins

func (puo *PlayerUpdateOne) SetWins(i int) *PlayerUpdateOne

SetWins sets the "wins" field.

type Players

type Players []*Player

Players is a parsable slice of Player.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type RoundStats

type RoundStats struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Round holds the value of the "round" field.
	Round uint `json:"round,omitempty"`
	// Bank holds the value of the "bank" field.
	Bank uint `json:"bank,omitempty"`
	// Equipment holds the value of the "equipment" field.
	Equipment uint `json:"equipment,omitempty"`
	// Spent holds the value of the "spent" field.
	Spent uint `json:"spent,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RoundStatsQuery when eager-loading is set.
	Edges RoundStatsEdges `json:"edges"`
	// contains filtered or unexported fields
}

RoundStats is the model entity for the RoundStats schema.

func (*RoundStats) QueryMatchPlayer

func (rs *RoundStats) QueryMatchPlayer() *MatchPlayerQuery

QueryMatchPlayer queries the "match_player" edge of the RoundStats entity.

func (*RoundStats) String

func (rs *RoundStats) String() string

String implements the fmt.Stringer.

func (*RoundStats) Unwrap

func (rs *RoundStats) Unwrap() *RoundStats

Unwrap unwraps the RoundStats entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*RoundStats) Update

func (rs *RoundStats) Update() *RoundStatsUpdateOne

Update returns a builder for updating this RoundStats. Note that you need to call RoundStats.Unwrap() before calling this method if this RoundStats was returned from a transaction, and the transaction was committed or rolled back.

type RoundStatsClient

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

RoundStatsClient is a client for the RoundStats schema.

func NewRoundStatsClient

func NewRoundStatsClient(c config) *RoundStatsClient

NewRoundStatsClient returns a client for the RoundStats from the given config.

func (*RoundStatsClient) Create

func (c *RoundStatsClient) Create() *RoundStatsCreate

Create returns a builder for creating a RoundStats entity.

func (*RoundStatsClient) CreateBulk

func (c *RoundStatsClient) CreateBulk(builders ...*RoundStatsCreate) *RoundStatsCreateBulk

CreateBulk returns a builder for creating a bulk of RoundStats entities.

func (*RoundStatsClient) Delete

func (c *RoundStatsClient) Delete() *RoundStatsDelete

Delete returns a delete builder for RoundStats.

func (*RoundStatsClient) DeleteOne

func (c *RoundStatsClient) DeleteOne(rs *RoundStats) *RoundStatsDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RoundStatsClient) DeleteOneID

func (c *RoundStatsClient) DeleteOneID(id int) *RoundStatsDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*RoundStatsClient) Get

func (c *RoundStatsClient) Get(ctx context.Context, id int) (*RoundStats, error)

Get returns a RoundStats entity by its id.

func (*RoundStatsClient) GetX

func (c *RoundStatsClient) GetX(ctx context.Context, id int) *RoundStats

GetX is like Get, but panics if an error occurs.

func (*RoundStatsClient) Hooks

func (c *RoundStatsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RoundStatsClient) Query

func (c *RoundStatsClient) Query() *RoundStatsQuery

Query returns a query builder for RoundStats.

func (*RoundStatsClient) QueryMatchPlayer

func (c *RoundStatsClient) QueryMatchPlayer(rs *RoundStats) *MatchPlayerQuery

QueryMatchPlayer queries the match_player edge of a RoundStats.

func (*RoundStatsClient) Update

func (c *RoundStatsClient) Update() *RoundStatsUpdate

Update returns an update builder for RoundStats.

func (*RoundStatsClient) UpdateOne

func (c *RoundStatsClient) UpdateOne(rs *RoundStats) *RoundStatsUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RoundStatsClient) UpdateOneID

func (c *RoundStatsClient) UpdateOneID(id int) *RoundStatsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RoundStatsClient) Use

func (c *RoundStatsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `roundstats.Hooks(f(g(h())))`.

type RoundStatsCreate

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

RoundStatsCreate is the builder for creating a RoundStats entity.

func (*RoundStatsCreate) Exec

func (rsc *RoundStatsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoundStatsCreate) ExecX

func (rsc *RoundStatsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoundStatsCreate) Mutation

func (rsc *RoundStatsCreate) Mutation() *RoundStatsMutation

Mutation returns the RoundStatsMutation object of the builder.

func (*RoundStatsCreate) Save

func (rsc *RoundStatsCreate) Save(ctx context.Context) (*RoundStats, error)

Save creates the RoundStats in the database.

func (*RoundStatsCreate) SaveX

func (rsc *RoundStatsCreate) SaveX(ctx context.Context) *RoundStats

SaveX calls Save and panics if Save returns an error.

func (*RoundStatsCreate) SetBank

func (rsc *RoundStatsCreate) SetBank(u uint) *RoundStatsCreate

SetBank sets the "bank" field.

func (*RoundStatsCreate) SetEquipment

func (rsc *RoundStatsCreate) SetEquipment(u uint) *RoundStatsCreate

SetEquipment sets the "equipment" field.

func (*RoundStatsCreate) SetMatchPlayer

func (rsc *RoundStatsCreate) SetMatchPlayer(m *MatchPlayer) *RoundStatsCreate

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsCreate) SetMatchPlayerID

func (rsc *RoundStatsCreate) SetMatchPlayerID(id int) *RoundStatsCreate

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*RoundStatsCreate) SetNillableMatchPlayerID

func (rsc *RoundStatsCreate) SetNillableMatchPlayerID(id *int) *RoundStatsCreate

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*RoundStatsCreate) SetRound

func (rsc *RoundStatsCreate) SetRound(u uint) *RoundStatsCreate

SetRound sets the "round" field.

func (*RoundStatsCreate) SetSpent

func (rsc *RoundStatsCreate) SetSpent(u uint) *RoundStatsCreate

SetSpent sets the "spent" field.

type RoundStatsCreateBulk

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

RoundStatsCreateBulk is the builder for creating many RoundStats entities in bulk.

func (*RoundStatsCreateBulk) Exec

func (rscb *RoundStatsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RoundStatsCreateBulk) ExecX

func (rscb *RoundStatsCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoundStatsCreateBulk) Save

func (rscb *RoundStatsCreateBulk) Save(ctx context.Context) ([]*RoundStats, error)

Save creates the RoundStats entities in the database.

func (*RoundStatsCreateBulk) SaveX

func (rscb *RoundStatsCreateBulk) SaveX(ctx context.Context) []*RoundStats

SaveX is like Save, but panics if an error occurs.

type RoundStatsDelete

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

RoundStatsDelete is the builder for deleting a RoundStats entity.

func (*RoundStatsDelete) Exec

func (rsd *RoundStatsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RoundStatsDelete) ExecX

func (rsd *RoundStatsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RoundStatsDelete) Where

Where appends a list predicates to the RoundStatsDelete builder.

type RoundStatsDeleteOne

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

RoundStatsDeleteOne is the builder for deleting a single RoundStats entity.

func (*RoundStatsDeleteOne) Exec

func (rsdo *RoundStatsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RoundStatsDeleteOne) ExecX

func (rsdo *RoundStatsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type RoundStatsEdges

type RoundStatsEdges struct {
	// MatchPlayer holds the value of the match_player edge.
	MatchPlayer *MatchPlayer `json:"match_player,omitempty"`
	// contains filtered or unexported fields
}

RoundStatsEdges holds the relations/edges for other nodes in the graph.

func (RoundStatsEdges) MatchPlayerOrErr

func (e RoundStatsEdges) MatchPlayerOrErr() (*MatchPlayer, error)

MatchPlayerOrErr returns the MatchPlayer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RoundStatsGroupBy

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

RoundStatsGroupBy is the group-by builder for RoundStats entities.

func (*RoundStatsGroupBy) Aggregate

func (rsgb *RoundStatsGroupBy) Aggregate(fns ...AggregateFunc) *RoundStatsGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RoundStatsGroupBy) Bool

func (s *RoundStatsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) BoolX

func (s *RoundStatsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoundStatsGroupBy) Bools

func (s *RoundStatsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) BoolsX

func (s *RoundStatsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoundStatsGroupBy) Float64

func (s *RoundStatsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) Float64X

func (s *RoundStatsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoundStatsGroupBy) Float64s

func (s *RoundStatsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) Float64sX

func (s *RoundStatsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoundStatsGroupBy) Int

func (s *RoundStatsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) IntX

func (s *RoundStatsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoundStatsGroupBy) Ints

func (s *RoundStatsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) IntsX

func (s *RoundStatsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoundStatsGroupBy) Scan

func (rsgb *RoundStatsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*RoundStatsGroupBy) ScanX

func (s *RoundStatsGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RoundStatsGroupBy) String

func (s *RoundStatsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) StringX

func (s *RoundStatsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoundStatsGroupBy) Strings

func (s *RoundStatsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoundStatsGroupBy) StringsX

func (s *RoundStatsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoundStatsMutation

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

RoundStatsMutation represents an operation that mutates the RoundStats nodes in the graph.

func (*RoundStatsMutation) AddBank

func (m *RoundStatsMutation) AddBank(u int)

AddBank adds u to the "bank" field.

func (*RoundStatsMutation) AddEquipment

func (m *RoundStatsMutation) AddEquipment(u int)

AddEquipment adds u to the "equipment" field.

func (*RoundStatsMutation) AddField

func (m *RoundStatsMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RoundStatsMutation) AddRound

func (m *RoundStatsMutation) AddRound(u int)

AddRound adds u to the "round" field.

func (*RoundStatsMutation) AddSpent

func (m *RoundStatsMutation) AddSpent(u int)

AddSpent adds u to the "spent" field.

func (*RoundStatsMutation) AddedBank

func (m *RoundStatsMutation) AddedBank() (r int, exists bool)

AddedBank returns the value that was added to the "bank" field in this mutation.

func (*RoundStatsMutation) AddedEdges

func (m *RoundStatsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RoundStatsMutation) AddedEquipment

func (m *RoundStatsMutation) AddedEquipment() (r int, exists bool)

AddedEquipment returns the value that was added to the "equipment" field in this mutation.

func (*RoundStatsMutation) AddedField

func (m *RoundStatsMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RoundStatsMutation) AddedFields

func (m *RoundStatsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RoundStatsMutation) AddedIDs

func (m *RoundStatsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RoundStatsMutation) AddedRound

func (m *RoundStatsMutation) AddedRound() (r int, exists bool)

AddedRound returns the value that was added to the "round" field in this mutation.

func (*RoundStatsMutation) AddedSpent

func (m *RoundStatsMutation) AddedSpent() (r int, exists bool)

AddedSpent returns the value that was added to the "spent" field in this mutation.

func (*RoundStatsMutation) Bank

func (m *RoundStatsMutation) Bank() (r uint, exists bool)

Bank returns the value of the "bank" field in the mutation.

func (*RoundStatsMutation) ClearEdge

func (m *RoundStatsMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RoundStatsMutation) ClearField

func (m *RoundStatsMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RoundStatsMutation) ClearMatchPlayer

func (m *RoundStatsMutation) ClearMatchPlayer()

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsMutation) ClearedEdges

func (m *RoundStatsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RoundStatsMutation) ClearedFields

func (m *RoundStatsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RoundStatsMutation) Client

func (m RoundStatsMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RoundStatsMutation) EdgeCleared

func (m *RoundStatsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RoundStatsMutation) Equipment

func (m *RoundStatsMutation) Equipment() (r uint, exists bool)

Equipment returns the value of the "equipment" field in the mutation.

func (*RoundStatsMutation) Field

func (m *RoundStatsMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RoundStatsMutation) FieldCleared

func (m *RoundStatsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RoundStatsMutation) Fields

func (m *RoundStatsMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RoundStatsMutation) ID

func (m *RoundStatsMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RoundStatsMutation) IDs

func (m *RoundStatsMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RoundStatsMutation) MatchPlayerCleared

func (m *RoundStatsMutation) MatchPlayerCleared() bool

MatchPlayerCleared reports if the "match_player" edge to the MatchPlayer entity was cleared.

func (*RoundStatsMutation) MatchPlayerID

func (m *RoundStatsMutation) MatchPlayerID() (id int, exists bool)

MatchPlayerID returns the "match_player" edge ID in the mutation.

func (*RoundStatsMutation) MatchPlayerIDs

func (m *RoundStatsMutation) MatchPlayerIDs() (ids []int)

MatchPlayerIDs returns the "match_player" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MatchPlayerID instead. It exists only for internal usage by the builders.

func (*RoundStatsMutation) OldBank

func (m *RoundStatsMutation) OldBank(ctx context.Context) (v uint, err error)

OldBank returns the old "bank" field's value of the RoundStats entity. If the RoundStats object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoundStatsMutation) OldEquipment

func (m *RoundStatsMutation) OldEquipment(ctx context.Context) (v uint, err error)

OldEquipment returns the old "equipment" field's value of the RoundStats entity. If the RoundStats object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoundStatsMutation) OldField

func (m *RoundStatsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RoundStatsMutation) OldRound

func (m *RoundStatsMutation) OldRound(ctx context.Context) (v uint, err error)

OldRound returns the old "round" field's value of the RoundStats entity. If the RoundStats object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoundStatsMutation) OldSpent

func (m *RoundStatsMutation) OldSpent(ctx context.Context) (v uint, err error)

OldSpent returns the old "spent" field's value of the RoundStats entity. If the RoundStats object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoundStatsMutation) Op

func (m *RoundStatsMutation) Op() Op

Op returns the operation name.

func (*RoundStatsMutation) RemovedEdges

func (m *RoundStatsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RoundStatsMutation) RemovedIDs

func (m *RoundStatsMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RoundStatsMutation) ResetBank

func (m *RoundStatsMutation) ResetBank()

ResetBank resets all changes to the "bank" field.

func (*RoundStatsMutation) ResetEdge

func (m *RoundStatsMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RoundStatsMutation) ResetEquipment

func (m *RoundStatsMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" field.

func (*RoundStatsMutation) ResetField

func (m *RoundStatsMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RoundStatsMutation) ResetMatchPlayer

func (m *RoundStatsMutation) ResetMatchPlayer()

ResetMatchPlayer resets all changes to the "match_player" edge.

func (*RoundStatsMutation) ResetRound

func (m *RoundStatsMutation) ResetRound()

ResetRound resets all changes to the "round" field.

func (*RoundStatsMutation) ResetSpent

func (m *RoundStatsMutation) ResetSpent()

ResetSpent resets all changes to the "spent" field.

func (*RoundStatsMutation) Round

func (m *RoundStatsMutation) Round() (r uint, exists bool)

Round returns the value of the "round" field in the mutation.

func (*RoundStatsMutation) SetBank

func (m *RoundStatsMutation) SetBank(u uint)

SetBank sets the "bank" field.

func (*RoundStatsMutation) SetEquipment

func (m *RoundStatsMutation) SetEquipment(u uint)

SetEquipment sets the "equipment" field.

func (*RoundStatsMutation) SetField

func (m *RoundStatsMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RoundStatsMutation) SetMatchPlayerID

func (m *RoundStatsMutation) SetMatchPlayerID(id int)

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by id.

func (*RoundStatsMutation) SetRound

func (m *RoundStatsMutation) SetRound(u uint)

SetRound sets the "round" field.

func (*RoundStatsMutation) SetSpent

func (m *RoundStatsMutation) SetSpent(u uint)

SetSpent sets the "spent" field.

func (*RoundStatsMutation) Spent

func (m *RoundStatsMutation) Spent() (r uint, exists bool)

Spent returns the value of the "spent" field in the mutation.

func (RoundStatsMutation) Tx

func (m RoundStatsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RoundStatsMutation) Type

func (m *RoundStatsMutation) Type() string

Type returns the node type of this mutation (RoundStats).

func (*RoundStatsMutation) Where

func (m *RoundStatsMutation) Where(ps ...predicate.RoundStats)

Where appends a list predicates to the RoundStatsMutation builder.

type RoundStatsQuery

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

RoundStatsQuery is the builder for querying RoundStats entities.

func (*RoundStatsQuery) All

func (rsq *RoundStatsQuery) All(ctx context.Context) ([]*RoundStats, error)

All executes the query and returns a list of RoundStatsSlice.

func (*RoundStatsQuery) AllX

func (rsq *RoundStatsQuery) AllX(ctx context.Context) []*RoundStats

AllX is like All, but panics if an error occurs.

func (*RoundStatsQuery) Clone

func (rsq *RoundStatsQuery) Clone() *RoundStatsQuery

Clone returns a duplicate of the RoundStatsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RoundStatsQuery) Count

func (rsq *RoundStatsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RoundStatsQuery) CountX

func (rsq *RoundStatsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RoundStatsQuery) Exist

func (rsq *RoundStatsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RoundStatsQuery) ExistX

func (rsq *RoundStatsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RoundStatsQuery) First

func (rsq *RoundStatsQuery) First(ctx context.Context) (*RoundStats, error)

First returns the first RoundStats entity from the query. Returns a *NotFoundError when no RoundStats was found.

func (*RoundStatsQuery) FirstID

func (rsq *RoundStatsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first RoundStats ID from the query. Returns a *NotFoundError when no RoundStats ID was found.

func (*RoundStatsQuery) FirstIDX

func (rsq *RoundStatsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RoundStatsQuery) FirstX

func (rsq *RoundStatsQuery) FirstX(ctx context.Context) *RoundStats

FirstX is like First, but panics if an error occurs.

func (*RoundStatsQuery) GroupBy

func (rsq *RoundStatsQuery) GroupBy(field string, fields ...string) *RoundStatsGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Round uint `json:"round,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RoundStats.Query().
	GroupBy(roundstats.FieldRound).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RoundStatsQuery) IDs

func (rsq *RoundStatsQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of RoundStats IDs.

func (*RoundStatsQuery) IDsX

func (rsq *RoundStatsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RoundStatsQuery) Limit

func (rsq *RoundStatsQuery) Limit(limit int) *RoundStatsQuery

Limit adds a limit step to the query.

func (*RoundStatsQuery) Modify

func (rsq *RoundStatsQuery) Modify(modifiers ...func(s *sql.Selector)) *RoundStatsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RoundStatsQuery) Offset

func (rsq *RoundStatsQuery) Offset(offset int) *RoundStatsQuery

Offset adds an offset step to the query.

func (*RoundStatsQuery) Only

func (rsq *RoundStatsQuery) Only(ctx context.Context) (*RoundStats, error)

Only returns a single RoundStats entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RoundStats entity is found. Returns a *NotFoundError when no RoundStats entities are found.

func (*RoundStatsQuery) OnlyID

func (rsq *RoundStatsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only RoundStats ID in the query. Returns a *NotSingularError when more than one RoundStats ID is found. Returns a *NotFoundError when no entities are found.

func (*RoundStatsQuery) OnlyIDX

func (rsq *RoundStatsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RoundStatsQuery) OnlyX

func (rsq *RoundStatsQuery) OnlyX(ctx context.Context) *RoundStats

OnlyX is like Only, but panics if an error occurs.

func (*RoundStatsQuery) Order

func (rsq *RoundStatsQuery) Order(o ...OrderFunc) *RoundStatsQuery

Order adds an order step to the query.

func (*RoundStatsQuery) QueryMatchPlayer

func (rsq *RoundStatsQuery) QueryMatchPlayer() *MatchPlayerQuery

QueryMatchPlayer chains the current query on the "match_player" edge.

func (*RoundStatsQuery) Select

func (rsq *RoundStatsQuery) Select(fields ...string) *RoundStatsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Round uint `json:"round,omitempty"`
}

client.RoundStats.Query().
	Select(roundstats.FieldRound).
	Scan(ctx, &v)

func (*RoundStatsQuery) Unique

func (rsq *RoundStatsQuery) Unique(unique bool) *RoundStatsQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RoundStatsQuery) Where

Where adds a new predicate for the RoundStatsQuery builder.

func (*RoundStatsQuery) WithMatchPlayer

func (rsq *RoundStatsQuery) WithMatchPlayer(opts ...func(*MatchPlayerQuery)) *RoundStatsQuery

WithMatchPlayer tells the query-builder to eager-load the nodes that are connected to the "match_player" edge. The optional arguments are used to configure the query builder of the edge.

type RoundStatsSelect

type RoundStatsSelect struct {
	*RoundStatsQuery
	// contains filtered or unexported fields
}

RoundStatsSelect is the builder for selecting fields of RoundStats entities.

func (*RoundStatsSelect) Bool

func (s *RoundStatsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) BoolX

func (s *RoundStatsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoundStatsSelect) Bools

func (s *RoundStatsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) BoolsX

func (s *RoundStatsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoundStatsSelect) Float64

func (s *RoundStatsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) Float64X

func (s *RoundStatsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoundStatsSelect) Float64s

func (s *RoundStatsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) Float64sX

func (s *RoundStatsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoundStatsSelect) Int

func (s *RoundStatsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) IntX

func (s *RoundStatsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoundStatsSelect) Ints

func (s *RoundStatsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) IntsX

func (s *RoundStatsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoundStatsSelect) Modify

func (rss *RoundStatsSelect) Modify(modifiers ...func(s *sql.Selector)) *RoundStatsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RoundStatsSelect) Scan

func (rss *RoundStatsSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*RoundStatsSelect) ScanX

func (s *RoundStatsSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RoundStatsSelect) String

func (s *RoundStatsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) StringX

func (s *RoundStatsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoundStatsSelect) Strings

func (s *RoundStatsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoundStatsSelect) StringsX

func (s *RoundStatsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoundStatsSlice

type RoundStatsSlice []*RoundStats

RoundStatsSlice is a parsable slice of RoundStats.

type RoundStatsUpdate

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

RoundStatsUpdate is the builder for updating RoundStats entities.

func (*RoundStatsUpdate) AddBank

func (rsu *RoundStatsUpdate) AddBank(u int) *RoundStatsUpdate

AddBank adds u to the "bank" field.

func (*RoundStatsUpdate) AddEquipment

func (rsu *RoundStatsUpdate) AddEquipment(u int) *RoundStatsUpdate

AddEquipment adds u to the "equipment" field.

func (*RoundStatsUpdate) AddRound

func (rsu *RoundStatsUpdate) AddRound(u int) *RoundStatsUpdate

AddRound adds u to the "round" field.

func (*RoundStatsUpdate) AddSpent

func (rsu *RoundStatsUpdate) AddSpent(u int) *RoundStatsUpdate

AddSpent adds u to the "spent" field.

func (*RoundStatsUpdate) ClearMatchPlayer

func (rsu *RoundStatsUpdate) ClearMatchPlayer() *RoundStatsUpdate

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsUpdate) Exec

func (rsu *RoundStatsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoundStatsUpdate) ExecX

func (rsu *RoundStatsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoundStatsUpdate) Modify

func (rsu *RoundStatsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoundStatsUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoundStatsUpdate) Mutation

func (rsu *RoundStatsUpdate) Mutation() *RoundStatsMutation

Mutation returns the RoundStatsMutation object of the builder.

func (*RoundStatsUpdate) Save

func (rsu *RoundStatsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RoundStatsUpdate) SaveX

func (rsu *RoundStatsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RoundStatsUpdate) SetBank

func (rsu *RoundStatsUpdate) SetBank(u uint) *RoundStatsUpdate

SetBank sets the "bank" field.

func (*RoundStatsUpdate) SetEquipment

func (rsu *RoundStatsUpdate) SetEquipment(u uint) *RoundStatsUpdate

SetEquipment sets the "equipment" field.

func (*RoundStatsUpdate) SetMatchPlayer

func (rsu *RoundStatsUpdate) SetMatchPlayer(m *MatchPlayer) *RoundStatsUpdate

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsUpdate) SetMatchPlayerID

func (rsu *RoundStatsUpdate) SetMatchPlayerID(id int) *RoundStatsUpdate

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*RoundStatsUpdate) SetNillableMatchPlayerID

func (rsu *RoundStatsUpdate) SetNillableMatchPlayerID(id *int) *RoundStatsUpdate

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*RoundStatsUpdate) SetRound

func (rsu *RoundStatsUpdate) SetRound(u uint) *RoundStatsUpdate

SetRound sets the "round" field.

func (*RoundStatsUpdate) SetSpent

func (rsu *RoundStatsUpdate) SetSpent(u uint) *RoundStatsUpdate

SetSpent sets the "spent" field.

func (*RoundStatsUpdate) Where

Where appends a list predicates to the RoundStatsUpdate builder.

type RoundStatsUpdateOne

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

RoundStatsUpdateOne is the builder for updating a single RoundStats entity.

func (*RoundStatsUpdateOne) AddBank

func (rsuo *RoundStatsUpdateOne) AddBank(u int) *RoundStatsUpdateOne

AddBank adds u to the "bank" field.

func (*RoundStatsUpdateOne) AddEquipment

func (rsuo *RoundStatsUpdateOne) AddEquipment(u int) *RoundStatsUpdateOne

AddEquipment adds u to the "equipment" field.

func (*RoundStatsUpdateOne) AddRound

func (rsuo *RoundStatsUpdateOne) AddRound(u int) *RoundStatsUpdateOne

AddRound adds u to the "round" field.

func (*RoundStatsUpdateOne) AddSpent

func (rsuo *RoundStatsUpdateOne) AddSpent(u int) *RoundStatsUpdateOne

AddSpent adds u to the "spent" field.

func (*RoundStatsUpdateOne) ClearMatchPlayer

func (rsuo *RoundStatsUpdateOne) ClearMatchPlayer() *RoundStatsUpdateOne

ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsUpdateOne) Exec

func (rsuo *RoundStatsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RoundStatsUpdateOne) ExecX

func (rsuo *RoundStatsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoundStatsUpdateOne) Modify

func (rsuo *RoundStatsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoundStatsUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoundStatsUpdateOne) Mutation

func (rsuo *RoundStatsUpdateOne) Mutation() *RoundStatsMutation

Mutation returns the RoundStatsMutation object of the builder.

func (*RoundStatsUpdateOne) Save

func (rsuo *RoundStatsUpdateOne) Save(ctx context.Context) (*RoundStats, error)

Save executes the query and returns the updated RoundStats entity.

func (*RoundStatsUpdateOne) SaveX

func (rsuo *RoundStatsUpdateOne) SaveX(ctx context.Context) *RoundStats

SaveX is like Save, but panics if an error occurs.

func (*RoundStatsUpdateOne) Select

func (rsuo *RoundStatsUpdateOne) Select(field string, fields ...string) *RoundStatsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RoundStatsUpdateOne) SetBank

func (rsuo *RoundStatsUpdateOne) SetBank(u uint) *RoundStatsUpdateOne

SetBank sets the "bank" field.

func (*RoundStatsUpdateOne) SetEquipment

func (rsuo *RoundStatsUpdateOne) SetEquipment(u uint) *RoundStatsUpdateOne

SetEquipment sets the "equipment" field.

func (*RoundStatsUpdateOne) SetMatchPlayer

func (rsuo *RoundStatsUpdateOne) SetMatchPlayer(m *MatchPlayer) *RoundStatsUpdateOne

SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.

func (*RoundStatsUpdateOne) SetMatchPlayerID

func (rsuo *RoundStatsUpdateOne) SetMatchPlayerID(id int) *RoundStatsUpdateOne

SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.

func (*RoundStatsUpdateOne) SetNillableMatchPlayerID

func (rsuo *RoundStatsUpdateOne) SetNillableMatchPlayerID(id *int) *RoundStatsUpdateOne

SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*RoundStatsUpdateOne) SetRound

func (rsuo *RoundStatsUpdateOne) SetRound(u uint) *RoundStatsUpdateOne

SetRound sets the "round" field.

func (*RoundStatsUpdateOne) SetSpent

func (rsuo *RoundStatsUpdateOne) SetSpent(u uint) *RoundStatsUpdateOne

SetSpent sets the "spent" field.

type Spray

type Spray struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Weapon holds the value of the "weapon" field.
	Weapon int `json:"weapon,omitempty"`
	// Spray holds the value of the "spray" field.
	Spray []byte `json:"spray,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SprayQuery when eager-loading is set.
	Edges SprayEdges `json:"edges"`
	// contains filtered or unexported fields
}

Spray is the model entity for the Spray schema.

func (*Spray) QueryMatchPlayers

func (s *Spray) QueryMatchPlayers() *MatchPlayerQuery

QueryMatchPlayers queries the "match_players" edge of the Spray entity.

func (*Spray) String

func (s *Spray) String() string

String implements the fmt.Stringer.

func (*Spray) Unwrap

func (s *Spray) Unwrap() *Spray

Unwrap unwraps the Spray entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Spray) Update

func (s *Spray) Update() *SprayUpdateOne

Update returns a builder for updating this Spray. Note that you need to call Spray.Unwrap() before calling this method if this Spray was returned from a transaction, and the transaction was committed or rolled back.

type SprayClient

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

SprayClient is a client for the Spray schema.

func NewSprayClient

func NewSprayClient(c config) *SprayClient

NewSprayClient returns a client for the Spray from the given config.

func (*SprayClient) Create

func (c *SprayClient) Create() *SprayCreate

Create returns a builder for creating a Spray entity.

func (*SprayClient) CreateBulk

func (c *SprayClient) CreateBulk(builders ...*SprayCreate) *SprayCreateBulk

CreateBulk returns a builder for creating a bulk of Spray entities.

func (*SprayClient) Delete

func (c *SprayClient) Delete() *SprayDelete

Delete returns a delete builder for Spray.

func (*SprayClient) DeleteOne

func (c *SprayClient) DeleteOne(s *Spray) *SprayDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SprayClient) DeleteOneID

func (c *SprayClient) DeleteOneID(id int) *SprayDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*SprayClient) Get

func (c *SprayClient) Get(ctx context.Context, id int) (*Spray, error)

Get returns a Spray entity by its id.

func (*SprayClient) GetX

func (c *SprayClient) GetX(ctx context.Context, id int) *Spray

GetX is like Get, but panics if an error occurs.

func (*SprayClient) Hooks

func (c *SprayClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SprayClient) Query

func (c *SprayClient) Query() *SprayQuery

Query returns a query builder for Spray.

func (*SprayClient) QueryMatchPlayers

func (c *SprayClient) QueryMatchPlayers(s *Spray) *MatchPlayerQuery

QueryMatchPlayers queries the match_players edge of a Spray.

func (*SprayClient) Update

func (c *SprayClient) Update() *SprayUpdate

Update returns an update builder for Spray.

func (*SprayClient) UpdateOne

func (c *SprayClient) UpdateOne(s *Spray) *SprayUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SprayClient) UpdateOneID

func (c *SprayClient) UpdateOneID(id int) *SprayUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SprayClient) Use

func (c *SprayClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `spray.Hooks(f(g(h())))`.

type SprayCreate

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

SprayCreate is the builder for creating a Spray entity.

func (*SprayCreate) Exec

func (sc *SprayCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SprayCreate) ExecX

func (sc *SprayCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SprayCreate) Mutation

func (sc *SprayCreate) Mutation() *SprayMutation

Mutation returns the SprayMutation object of the builder.

func (*SprayCreate) Save

func (sc *SprayCreate) Save(ctx context.Context) (*Spray, error)

Save creates the Spray in the database.

func (*SprayCreate) SaveX

func (sc *SprayCreate) SaveX(ctx context.Context) *Spray

SaveX calls Save and panics if Save returns an error.

func (*SprayCreate) SetMatchPlayers

func (sc *SprayCreate) SetMatchPlayers(m *MatchPlayer) *SprayCreate

SetMatchPlayers sets the "match_players" edge to the MatchPlayer entity.

func (*SprayCreate) SetMatchPlayersID

func (sc *SprayCreate) SetMatchPlayersID(id int) *SprayCreate

SetMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID.

func (*SprayCreate) SetNillableMatchPlayersID

func (sc *SprayCreate) SetNillableMatchPlayersID(id *int) *SprayCreate

SetNillableMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*SprayCreate) SetSpray

func (sc *SprayCreate) SetSpray(b []byte) *SprayCreate

SetSpray sets the "spray" field.

func (*SprayCreate) SetWeapon

func (sc *SprayCreate) SetWeapon(i int) *SprayCreate

SetWeapon sets the "weapon" field.

type SprayCreateBulk

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

SprayCreateBulk is the builder for creating many Spray entities in bulk.

func (*SprayCreateBulk) Exec

func (scb *SprayCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SprayCreateBulk) ExecX

func (scb *SprayCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SprayCreateBulk) Save

func (scb *SprayCreateBulk) Save(ctx context.Context) ([]*Spray, error)

Save creates the Spray entities in the database.

func (*SprayCreateBulk) SaveX

func (scb *SprayCreateBulk) SaveX(ctx context.Context) []*Spray

SaveX is like Save, but panics if an error occurs.

type SprayDelete

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

SprayDelete is the builder for deleting a Spray entity.

func (*SprayDelete) Exec

func (sd *SprayDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SprayDelete) ExecX

func (sd *SprayDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SprayDelete) Where

func (sd *SprayDelete) Where(ps ...predicate.Spray) *SprayDelete

Where appends a list predicates to the SprayDelete builder.

type SprayDeleteOne

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

SprayDeleteOne is the builder for deleting a single Spray entity.

func (*SprayDeleteOne) Exec

func (sdo *SprayDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SprayDeleteOne) ExecX

func (sdo *SprayDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SprayEdges

type SprayEdges struct {
	// MatchPlayers holds the value of the match_players edge.
	MatchPlayers *MatchPlayer `json:"match_players,omitempty"`
	// contains filtered or unexported fields
}

SprayEdges holds the relations/edges for other nodes in the graph.

func (SprayEdges) MatchPlayersOrErr

func (e SprayEdges) MatchPlayersOrErr() (*MatchPlayer, error)

MatchPlayersOrErr returns the MatchPlayers value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SprayGroupBy

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

SprayGroupBy is the group-by builder for Spray entities.

func (*SprayGroupBy) Aggregate

func (sgb *SprayGroupBy) Aggregate(fns ...AggregateFunc) *SprayGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SprayGroupBy) Bool

func (s *SprayGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) BoolX

func (s *SprayGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SprayGroupBy) Bools

func (s *SprayGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) BoolsX

func (s *SprayGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SprayGroupBy) Float64

func (s *SprayGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) Float64X

func (s *SprayGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SprayGroupBy) Float64s

func (s *SprayGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) Float64sX

func (s *SprayGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SprayGroupBy) Int

func (s *SprayGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) IntX

func (s *SprayGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SprayGroupBy) Ints

func (s *SprayGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) IntsX

func (s *SprayGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SprayGroupBy) Scan

func (sgb *SprayGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SprayGroupBy) ScanX

func (s *SprayGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SprayGroupBy) String

func (s *SprayGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) StringX

func (s *SprayGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SprayGroupBy) Strings

func (s *SprayGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SprayGroupBy) StringsX

func (s *SprayGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SprayMutation

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

SprayMutation represents an operation that mutates the Spray nodes in the graph.

func (*SprayMutation) AddField

func (m *SprayMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SprayMutation) AddWeapon

func (m *SprayMutation) AddWeapon(i int)

AddWeapon adds i to the "weapon" field.

func (*SprayMutation) AddedEdges

func (m *SprayMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SprayMutation) AddedField

func (m *SprayMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SprayMutation) AddedFields

func (m *SprayMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SprayMutation) AddedIDs

func (m *SprayMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SprayMutation) AddedWeapon

func (m *SprayMutation) AddedWeapon() (r int, exists bool)

AddedWeapon returns the value that was added to the "weapon" field in this mutation.

func (*SprayMutation) ClearEdge

func (m *SprayMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SprayMutation) ClearField

func (m *SprayMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SprayMutation) ClearMatchPlayers

func (m *SprayMutation) ClearMatchPlayers()

ClearMatchPlayers clears the "match_players" edge to the MatchPlayer entity.

func (*SprayMutation) ClearedEdges

func (m *SprayMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SprayMutation) ClearedFields

func (m *SprayMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SprayMutation) Client

func (m SprayMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SprayMutation) EdgeCleared

func (m *SprayMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SprayMutation) Field

func (m *SprayMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SprayMutation) FieldCleared

func (m *SprayMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SprayMutation) Fields

func (m *SprayMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SprayMutation) ID

func (m *SprayMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SprayMutation) IDs

func (m *SprayMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SprayMutation) MatchPlayersCleared

func (m *SprayMutation) MatchPlayersCleared() bool

MatchPlayersCleared reports if the "match_players" edge to the MatchPlayer entity was cleared.

func (*SprayMutation) MatchPlayersID

func (m *SprayMutation) MatchPlayersID() (id int, exists bool)

MatchPlayersID returns the "match_players" edge ID in the mutation.

func (*SprayMutation) MatchPlayersIDs

func (m *SprayMutation) MatchPlayersIDs() (ids []int)

MatchPlayersIDs returns the "match_players" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MatchPlayersID instead. It exists only for internal usage by the builders.

func (*SprayMutation) OldField

func (m *SprayMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SprayMutation) OldSpray

func (m *SprayMutation) OldSpray(ctx context.Context) (v []byte, err error)

OldSpray returns the old "spray" field's value of the Spray entity. If the Spray object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SprayMutation) OldWeapon

func (m *SprayMutation) OldWeapon(ctx context.Context) (v int, err error)

OldWeapon returns the old "weapon" field's value of the Spray entity. If the Spray object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SprayMutation) Op

func (m *SprayMutation) Op() Op

Op returns the operation name.

func (*SprayMutation) RemovedEdges

func (m *SprayMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SprayMutation) RemovedIDs

func (m *SprayMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SprayMutation) ResetEdge

func (m *SprayMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SprayMutation) ResetField

func (m *SprayMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SprayMutation) ResetMatchPlayers

func (m *SprayMutation) ResetMatchPlayers()

ResetMatchPlayers resets all changes to the "match_players" edge.

func (*SprayMutation) ResetSpray

func (m *SprayMutation) ResetSpray()

ResetSpray resets all changes to the "spray" field.

func (*SprayMutation) ResetWeapon

func (m *SprayMutation) ResetWeapon()

ResetWeapon resets all changes to the "weapon" field.

func (*SprayMutation) SetField

func (m *SprayMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SprayMutation) SetMatchPlayersID

func (m *SprayMutation) SetMatchPlayersID(id int)

SetMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by id.

func (*SprayMutation) SetSpray

func (m *SprayMutation) SetSpray(b []byte)

SetSpray sets the "spray" field.

func (*SprayMutation) SetWeapon

func (m *SprayMutation) SetWeapon(i int)

SetWeapon sets the "weapon" field.

func (*SprayMutation) Spray

func (m *SprayMutation) Spray() (r []byte, exists bool)

Spray returns the value of the "spray" field in the mutation.

func (SprayMutation) Tx

func (m SprayMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SprayMutation) Type

func (m *SprayMutation) Type() string

Type returns the node type of this mutation (Spray).

func (*SprayMutation) Weapon

func (m *SprayMutation) Weapon() (r int, exists bool)

Weapon returns the value of the "weapon" field in the mutation.

func (*SprayMutation) Where

func (m *SprayMutation) Where(ps ...predicate.Spray)

Where appends a list predicates to the SprayMutation builder.

type SprayQuery

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

SprayQuery is the builder for querying Spray entities.

func (*SprayQuery) All

func (sq *SprayQuery) All(ctx context.Context) ([]*Spray, error)

All executes the query and returns a list of Sprays.

func (*SprayQuery) AllX

func (sq *SprayQuery) AllX(ctx context.Context) []*Spray

AllX is like All, but panics if an error occurs.

func (*SprayQuery) Clone

func (sq *SprayQuery) Clone() *SprayQuery

Clone returns a duplicate of the SprayQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SprayQuery) Count

func (sq *SprayQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SprayQuery) CountX

func (sq *SprayQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SprayQuery) Exist

func (sq *SprayQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SprayQuery) ExistX

func (sq *SprayQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SprayQuery) First

func (sq *SprayQuery) First(ctx context.Context) (*Spray, error)

First returns the first Spray entity from the query. Returns a *NotFoundError when no Spray was found.

func (*SprayQuery) FirstID

func (sq *SprayQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Spray ID from the query. Returns a *NotFoundError when no Spray ID was found.

func (*SprayQuery) FirstIDX

func (sq *SprayQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SprayQuery) FirstX

func (sq *SprayQuery) FirstX(ctx context.Context) *Spray

FirstX is like First, but panics if an error occurs.

func (*SprayQuery) GroupBy

func (sq *SprayQuery) GroupBy(field string, fields ...string) *SprayGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Weapon int `json:"weapon,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Spray.Query().
	GroupBy(spray.FieldWeapon).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SprayQuery) IDs

func (sq *SprayQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Spray IDs.

func (*SprayQuery) IDsX

func (sq *SprayQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SprayQuery) Limit

func (sq *SprayQuery) Limit(limit int) *SprayQuery

Limit adds a limit step to the query.

func (*SprayQuery) Modify

func (sq *SprayQuery) Modify(modifiers ...func(s *sql.Selector)) *SpraySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SprayQuery) Offset

func (sq *SprayQuery) Offset(offset int) *SprayQuery

Offset adds an offset step to the query.

func (*SprayQuery) Only

func (sq *SprayQuery) Only(ctx context.Context) (*Spray, error)

Only returns a single Spray entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Spray entity is found. Returns a *NotFoundError when no Spray entities are found.

func (*SprayQuery) OnlyID

func (sq *SprayQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Spray ID in the query. Returns a *NotSingularError when more than one Spray ID is found. Returns a *NotFoundError when no entities are found.

func (*SprayQuery) OnlyIDX

func (sq *SprayQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SprayQuery) OnlyX

func (sq *SprayQuery) OnlyX(ctx context.Context) *Spray

OnlyX is like Only, but panics if an error occurs.

func (*SprayQuery) Order

func (sq *SprayQuery) Order(o ...OrderFunc) *SprayQuery

Order adds an order step to the query.

func (*SprayQuery) QueryMatchPlayers

func (sq *SprayQuery) QueryMatchPlayers() *MatchPlayerQuery

QueryMatchPlayers chains the current query on the "match_players" edge.

func (*SprayQuery) Select

func (sq *SprayQuery) Select(fields ...string) *SpraySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Weapon int `json:"weapon,omitempty"`
}

client.Spray.Query().
	Select(spray.FieldWeapon).
	Scan(ctx, &v)

func (*SprayQuery) Unique

func (sq *SprayQuery) Unique(unique bool) *SprayQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SprayQuery) Where

func (sq *SprayQuery) Where(ps ...predicate.Spray) *SprayQuery

Where adds a new predicate for the SprayQuery builder.

func (*SprayQuery) WithMatchPlayers

func (sq *SprayQuery) WithMatchPlayers(opts ...func(*MatchPlayerQuery)) *SprayQuery

WithMatchPlayers tells the query-builder to eager-load the nodes that are connected to the "match_players" edge. The optional arguments are used to configure the query builder of the edge.

type SpraySelect

type SpraySelect struct {
	*SprayQuery
	// contains filtered or unexported fields
}

SpraySelect is the builder for selecting fields of Spray entities.

func (*SpraySelect) Bool

func (s *SpraySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SpraySelect) BoolX

func (s *SpraySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SpraySelect) Bools

func (s *SpraySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SpraySelect) BoolsX

func (s *SpraySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SpraySelect) Float64

func (s *SpraySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SpraySelect) Float64X

func (s *SpraySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SpraySelect) Float64s

func (s *SpraySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SpraySelect) Float64sX

func (s *SpraySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SpraySelect) Int

func (s *SpraySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SpraySelect) IntX

func (s *SpraySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SpraySelect) Ints

func (s *SpraySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SpraySelect) IntsX

func (s *SpraySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SpraySelect) Modify

func (ss *SpraySelect) Modify(modifiers ...func(s *sql.Selector)) *SpraySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SpraySelect) Scan

func (ss *SpraySelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SpraySelect) ScanX

func (s *SpraySelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SpraySelect) String

func (s *SpraySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SpraySelect) StringX

func (s *SpraySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SpraySelect) Strings

func (s *SpraySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SpraySelect) StringsX

func (s *SpraySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SprayUpdate

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

SprayUpdate is the builder for updating Spray entities.

func (*SprayUpdate) AddWeapon

func (su *SprayUpdate) AddWeapon(i int) *SprayUpdate

AddWeapon adds i to the "weapon" field.

func (*SprayUpdate) ClearMatchPlayers

func (su *SprayUpdate) ClearMatchPlayers() *SprayUpdate

ClearMatchPlayers clears the "match_players" edge to the MatchPlayer entity.

func (*SprayUpdate) Exec

func (su *SprayUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SprayUpdate) ExecX

func (su *SprayUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SprayUpdate) Modify

func (su *SprayUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SprayUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SprayUpdate) Mutation

func (su *SprayUpdate) Mutation() *SprayMutation

Mutation returns the SprayMutation object of the builder.

func (*SprayUpdate) Save

func (su *SprayUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SprayUpdate) SaveX

func (su *SprayUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SprayUpdate) SetMatchPlayers

func (su *SprayUpdate) SetMatchPlayers(m *MatchPlayer) *SprayUpdate

SetMatchPlayers sets the "match_players" edge to the MatchPlayer entity.

func (*SprayUpdate) SetMatchPlayersID

func (su *SprayUpdate) SetMatchPlayersID(id int) *SprayUpdate

SetMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID.

func (*SprayUpdate) SetNillableMatchPlayersID

func (su *SprayUpdate) SetNillableMatchPlayersID(id *int) *SprayUpdate

SetNillableMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*SprayUpdate) SetSpray

func (su *SprayUpdate) SetSpray(b []byte) *SprayUpdate

SetSpray sets the "spray" field.

func (*SprayUpdate) SetWeapon

func (su *SprayUpdate) SetWeapon(i int) *SprayUpdate

SetWeapon sets the "weapon" field.

func (*SprayUpdate) Where

func (su *SprayUpdate) Where(ps ...predicate.Spray) *SprayUpdate

Where appends a list predicates to the SprayUpdate builder.

type SprayUpdateOne

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

SprayUpdateOne is the builder for updating a single Spray entity.

func (*SprayUpdateOne) AddWeapon

func (suo *SprayUpdateOne) AddWeapon(i int) *SprayUpdateOne

AddWeapon adds i to the "weapon" field.

func (*SprayUpdateOne) ClearMatchPlayers

func (suo *SprayUpdateOne) ClearMatchPlayers() *SprayUpdateOne

ClearMatchPlayers clears the "match_players" edge to the MatchPlayer entity.

func (*SprayUpdateOne) Exec

func (suo *SprayUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SprayUpdateOne) ExecX

func (suo *SprayUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SprayUpdateOne) Modify

func (suo *SprayUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SprayUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SprayUpdateOne) Mutation

func (suo *SprayUpdateOne) Mutation() *SprayMutation

Mutation returns the SprayMutation object of the builder.

func (*SprayUpdateOne) Save

func (suo *SprayUpdateOne) Save(ctx context.Context) (*Spray, error)

Save executes the query and returns the updated Spray entity.

func (*SprayUpdateOne) SaveX

func (suo *SprayUpdateOne) SaveX(ctx context.Context) *Spray

SaveX is like Save, but panics if an error occurs.

func (*SprayUpdateOne) Select

func (suo *SprayUpdateOne) Select(field string, fields ...string) *SprayUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SprayUpdateOne) SetMatchPlayers

func (suo *SprayUpdateOne) SetMatchPlayers(m *MatchPlayer) *SprayUpdateOne

SetMatchPlayers sets the "match_players" edge to the MatchPlayer entity.

func (*SprayUpdateOne) SetMatchPlayersID

func (suo *SprayUpdateOne) SetMatchPlayersID(id int) *SprayUpdateOne

SetMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID.

func (*SprayUpdateOne) SetNillableMatchPlayersID

func (suo *SprayUpdateOne) SetNillableMatchPlayersID(id *int) *SprayUpdateOne

SetNillableMatchPlayersID sets the "match_players" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*SprayUpdateOne) SetSpray

func (suo *SprayUpdateOne) SetSpray(b []byte) *SprayUpdateOne

SetSpray sets the "spray" field.

func (*SprayUpdateOne) SetWeapon

func (suo *SprayUpdateOne) SetWeapon(i int) *SprayUpdateOne

SetWeapon sets the "weapon" field.

type Sprays

type Sprays []*Spray

Sprays is a parsable slice of Spray.

type Tx

type Tx struct {

	// Match is the client for interacting with the Match builders.
	Match *MatchClient
	// MatchPlayer is the client for interacting with the MatchPlayer builders.
	MatchPlayer *MatchPlayerClient
	// Messages is the client for interacting with the Messages builders.
	Messages *MessagesClient
	// Player is the client for interacting with the Player builders.
	Player *PlayerClient
	// RoundStats is the client for interacting with the RoundStats builders.
	RoundStats *RoundStatsClient
	// Spray is the client for interacting with the Spray builders.
	Spray *SprayClient
	// Weapon is the client for interacting with the Weapon builders.
	Weapon *WeaponClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Weapon

type Weapon struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Victim holds the value of the "victim" field.
	Victim uint64 `json:"victim,omitempty"`
	// Dmg holds the value of the "dmg" field.
	Dmg uint `json:"dmg,omitempty"`
	// EqType holds the value of the "eq_type" field.
	EqType int `json:"eq_type,omitempty"`
	// HitGroup holds the value of the "hit_group" field.
	HitGroup int `json:"hit_group,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WeaponQuery when eager-loading is set.
	Edges WeaponEdges `json:"edges"`
	// contains filtered or unexported fields
}

Weapon is the model entity for the Weapon schema.

func (*Weapon) QueryStat

func (w *Weapon) QueryStat() *MatchPlayerQuery

QueryStat queries the "stat" edge of the Weapon entity.

func (*Weapon) String

func (w *Weapon) String() string

String implements the fmt.Stringer.

func (*Weapon) Unwrap

func (w *Weapon) Unwrap() *Weapon

Unwrap unwraps the Weapon entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Weapon) Update

func (w *Weapon) Update() *WeaponUpdateOne

Update returns a builder for updating this Weapon. Note that you need to call Weapon.Unwrap() before calling this method if this Weapon was returned from a transaction, and the transaction was committed or rolled back.

type WeaponClient

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

WeaponClient is a client for the Weapon schema.

func NewWeaponClient

func NewWeaponClient(c config) *WeaponClient

NewWeaponClient returns a client for the Weapon from the given config.

func (*WeaponClient) Create

func (c *WeaponClient) Create() *WeaponCreate

Create returns a builder for creating a Weapon entity.

func (*WeaponClient) CreateBulk

func (c *WeaponClient) CreateBulk(builders ...*WeaponCreate) *WeaponCreateBulk

CreateBulk returns a builder for creating a bulk of Weapon entities.

func (*WeaponClient) Delete

func (c *WeaponClient) Delete() *WeaponDelete

Delete returns a delete builder for Weapon.

func (*WeaponClient) DeleteOne

func (c *WeaponClient) DeleteOne(w *Weapon) *WeaponDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WeaponClient) DeleteOneID

func (c *WeaponClient) DeleteOneID(id int) *WeaponDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*WeaponClient) Get

func (c *WeaponClient) Get(ctx context.Context, id int) (*Weapon, error)

Get returns a Weapon entity by its id.

func (*WeaponClient) GetX

func (c *WeaponClient) GetX(ctx context.Context, id int) *Weapon

GetX is like Get, but panics if an error occurs.

func (*WeaponClient) Hooks

func (c *WeaponClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WeaponClient) Query

func (c *WeaponClient) Query() *WeaponQuery

Query returns a query builder for Weapon.

func (*WeaponClient) QueryStat

func (c *WeaponClient) QueryStat(w *Weapon) *MatchPlayerQuery

QueryStat queries the stat edge of a Weapon.

func (*WeaponClient) Update

func (c *WeaponClient) Update() *WeaponUpdate

Update returns an update builder for Weapon.

func (*WeaponClient) UpdateOne

func (c *WeaponClient) UpdateOne(w *Weapon) *WeaponUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WeaponClient) UpdateOneID

func (c *WeaponClient) UpdateOneID(id int) *WeaponUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WeaponClient) Use

func (c *WeaponClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `weapon.Hooks(f(g(h())))`.

type WeaponCreate

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

WeaponCreate is the builder for creating a Weapon entity.

func (*WeaponCreate) Exec

func (wc *WeaponCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponCreate) ExecX

func (wc *WeaponCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponCreate) Mutation

func (wc *WeaponCreate) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponCreate) Save

func (wc *WeaponCreate) Save(ctx context.Context) (*Weapon, error)

Save creates the Weapon in the database.

func (*WeaponCreate) SaveX

func (wc *WeaponCreate) SaveX(ctx context.Context) *Weapon

SaveX calls Save and panics if Save returns an error.

func (*WeaponCreate) SetDmg

func (wc *WeaponCreate) SetDmg(u uint) *WeaponCreate

SetDmg sets the "dmg" field.

func (*WeaponCreate) SetEqType

func (wc *WeaponCreate) SetEqType(i int) *WeaponCreate

SetEqType sets the "eq_type" field.

func (*WeaponCreate) SetHitGroup

func (wc *WeaponCreate) SetHitGroup(i int) *WeaponCreate

SetHitGroup sets the "hit_group" field.

func (*WeaponCreate) SetNillableStatID

func (wc *WeaponCreate) SetNillableStatID(id *int) *WeaponCreate

SetNillableStatID sets the "stat" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*WeaponCreate) SetStat

func (wc *WeaponCreate) SetStat(m *MatchPlayer) *WeaponCreate

SetStat sets the "stat" edge to the MatchPlayer entity.

func (*WeaponCreate) SetStatID

func (wc *WeaponCreate) SetStatID(id int) *WeaponCreate

SetStatID sets the "stat" edge to the MatchPlayer entity by ID.

func (*WeaponCreate) SetVictim

func (wc *WeaponCreate) SetVictim(u uint64) *WeaponCreate

SetVictim sets the "victim" field.

type WeaponCreateBulk

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

WeaponCreateBulk is the builder for creating many Weapon entities in bulk.

func (*WeaponCreateBulk) Exec

func (wcb *WeaponCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponCreateBulk) ExecX

func (wcb *WeaponCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponCreateBulk) Save

func (wcb *WeaponCreateBulk) Save(ctx context.Context) ([]*Weapon, error)

Save creates the Weapon entities in the database.

func (*WeaponCreateBulk) SaveX

func (wcb *WeaponCreateBulk) SaveX(ctx context.Context) []*Weapon

SaveX is like Save, but panics if an error occurs.

type WeaponDelete

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

WeaponDelete is the builder for deleting a Weapon entity.

func (*WeaponDelete) Exec

func (wd *WeaponDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WeaponDelete) ExecX

func (wd *WeaponDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDelete) Where

func (wd *WeaponDelete) Where(ps ...predicate.Weapon) *WeaponDelete

Where appends a list predicates to the WeaponDelete builder.

type WeaponDeleteOne

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

WeaponDeleteOne is the builder for deleting a single Weapon entity.

func (*WeaponDeleteOne) Exec

func (wdo *WeaponDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WeaponDeleteOne) ExecX

func (wdo *WeaponDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type WeaponEdges

type WeaponEdges struct {
	// Stat holds the value of the stat edge.
	Stat *MatchPlayer `json:"stat,omitempty"`
	// contains filtered or unexported fields
}

WeaponEdges holds the relations/edges for other nodes in the graph.

func (WeaponEdges) StatOrErr

func (e WeaponEdges) StatOrErr() (*MatchPlayer, error)

StatOrErr returns the Stat value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WeaponGroupBy

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

WeaponGroupBy is the group-by builder for Weapon entities.

func (*WeaponGroupBy) Aggregate

func (wgb *WeaponGroupBy) Aggregate(fns ...AggregateFunc) *WeaponGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WeaponGroupBy) Bool

func (s *WeaponGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) BoolX

func (s *WeaponGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponGroupBy) Bools

func (s *WeaponGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) BoolsX

func (s *WeaponGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponGroupBy) Float64

func (s *WeaponGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) Float64X

func (s *WeaponGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponGroupBy) Float64s

func (s *WeaponGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) Float64sX

func (s *WeaponGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponGroupBy) Int

func (s *WeaponGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) IntX

func (s *WeaponGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponGroupBy) Ints

func (s *WeaponGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) IntsX

func (s *WeaponGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponGroupBy) Scan

func (wgb *WeaponGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*WeaponGroupBy) ScanX

func (s *WeaponGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WeaponGroupBy) String

func (s *WeaponGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) StringX

func (s *WeaponGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponGroupBy) Strings

func (s *WeaponGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) StringsX

func (s *WeaponGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponMutation

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

WeaponMutation represents an operation that mutates the Weapon nodes in the graph.

func (*WeaponMutation) AddDmg

func (m *WeaponMutation) AddDmg(u int)

AddDmg adds u to the "dmg" field.

func (*WeaponMutation) AddEqType

func (m *WeaponMutation) AddEqType(i int)

AddEqType adds i to the "eq_type" field.

func (*WeaponMutation) AddField

func (m *WeaponMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponMutation) AddHitGroup

func (m *WeaponMutation) AddHitGroup(i int)

AddHitGroup adds i to the "hit_group" field.

func (*WeaponMutation) AddVictim

func (m *WeaponMutation) AddVictim(u int64)

AddVictim adds u to the "victim" field.

func (*WeaponMutation) AddedDmg

func (m *WeaponMutation) AddedDmg() (r int, exists bool)

AddedDmg returns the value that was added to the "dmg" field in this mutation.

func (*WeaponMutation) AddedEdges

func (m *WeaponMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WeaponMutation) AddedEqType

func (m *WeaponMutation) AddedEqType() (r int, exists bool)

AddedEqType returns the value that was added to the "eq_type" field in this mutation.

func (*WeaponMutation) AddedField

func (m *WeaponMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponMutation) AddedFields

func (m *WeaponMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WeaponMutation) AddedHitGroup

func (m *WeaponMutation) AddedHitGroup() (r int, exists bool)

AddedHitGroup returns the value that was added to the "hit_group" field in this mutation.

func (*WeaponMutation) AddedIDs

func (m *WeaponMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WeaponMutation) AddedVictim

func (m *WeaponMutation) AddedVictim() (r int64, exists bool)

AddedVictim returns the value that was added to the "victim" field in this mutation.

func (*WeaponMutation) ClearEdge

func (m *WeaponMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*WeaponMutation) ClearField

func (m *WeaponMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponMutation) ClearStat

func (m *WeaponMutation) ClearStat()

ClearStat clears the "stat" edge to the MatchPlayer entity.

func (*WeaponMutation) ClearedEdges

func (m *WeaponMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WeaponMutation) ClearedFields

func (m *WeaponMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WeaponMutation) Client

func (m WeaponMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*WeaponMutation) Dmg

func (m *WeaponMutation) Dmg() (r uint, exists bool)

Dmg returns the value of the "dmg" field in the mutation.

func (*WeaponMutation) EdgeCleared

func (m *WeaponMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WeaponMutation) EqType

func (m *WeaponMutation) EqType() (r int, exists bool)

EqType returns the value of the "eq_type" field in the mutation.

func (*WeaponMutation) Field

func (m *WeaponMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponMutation) FieldCleared

func (m *WeaponMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WeaponMutation) Fields

func (m *WeaponMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*WeaponMutation) HitGroup

func (m *WeaponMutation) HitGroup() (r int, exists bool)

HitGroup returns the value of the "hit_group" field in the mutation.

func (*WeaponMutation) ID

func (m *WeaponMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WeaponMutation) IDs

func (m *WeaponMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WeaponMutation) OldDmg

func (m *WeaponMutation) OldDmg(ctx context.Context) (v uint, err error)

OldDmg returns the old "dmg" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldEqType

func (m *WeaponMutation) OldEqType(ctx context.Context) (v int, err error)

OldEqType returns the old "eq_type" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldField

func (m *WeaponMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*WeaponMutation) OldHitGroup

func (m *WeaponMutation) OldHitGroup(ctx context.Context) (v int, err error)

OldHitGroup returns the old "hit_group" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldVictim

func (m *WeaponMutation) OldVictim(ctx context.Context) (v uint64, err error)

OldVictim returns the old "victim" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) Op

func (m *WeaponMutation) Op() Op

Op returns the operation name.

func (*WeaponMutation) RemovedEdges

func (m *WeaponMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WeaponMutation) RemovedIDs

func (m *WeaponMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*WeaponMutation) ResetDmg

func (m *WeaponMutation) ResetDmg()

ResetDmg resets all changes to the "dmg" field.

func (*WeaponMutation) ResetEdge

func (m *WeaponMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*WeaponMutation) ResetEqType

func (m *WeaponMutation) ResetEqType()

ResetEqType resets all changes to the "eq_type" field.

func (*WeaponMutation) ResetField

func (m *WeaponMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponMutation) ResetHitGroup

func (m *WeaponMutation) ResetHitGroup()

ResetHitGroup resets all changes to the "hit_group" field.

func (*WeaponMutation) ResetStat

func (m *WeaponMutation) ResetStat()

ResetStat resets all changes to the "stat" edge.

func (*WeaponMutation) ResetVictim

func (m *WeaponMutation) ResetVictim()

ResetVictim resets all changes to the "victim" field.

func (*WeaponMutation) SetDmg

func (m *WeaponMutation) SetDmg(u uint)

SetDmg sets the "dmg" field.

func (*WeaponMutation) SetEqType

func (m *WeaponMutation) SetEqType(i int)

SetEqType sets the "eq_type" field.

func (*WeaponMutation) SetField

func (m *WeaponMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponMutation) SetHitGroup

func (m *WeaponMutation) SetHitGroup(i int)

SetHitGroup sets the "hit_group" field.

func (*WeaponMutation) SetStatID

func (m *WeaponMutation) SetStatID(id int)

SetStatID sets the "stat" edge to the MatchPlayer entity by id.

func (*WeaponMutation) SetVictim

func (m *WeaponMutation) SetVictim(u uint64)

SetVictim sets the "victim" field.

func (*WeaponMutation) StatCleared

func (m *WeaponMutation) StatCleared() bool

StatCleared reports if the "stat" edge to the MatchPlayer entity was cleared.

func (*WeaponMutation) StatID

func (m *WeaponMutation) StatID() (id int, exists bool)

StatID returns the "stat" edge ID in the mutation.

func (*WeaponMutation) StatIDs

func (m *WeaponMutation) StatIDs() (ids []int)

StatIDs returns the "stat" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StatID instead. It exists only for internal usage by the builders.

func (WeaponMutation) Tx

func (m WeaponMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WeaponMutation) Type

func (m *WeaponMutation) Type() string

Type returns the node type of this mutation (Weapon).

func (*WeaponMutation) Victim

func (m *WeaponMutation) Victim() (r uint64, exists bool)

Victim returns the value of the "victim" field in the mutation.

func (*WeaponMutation) Where

func (m *WeaponMutation) Where(ps ...predicate.Weapon)

Where appends a list predicates to the WeaponMutation builder.

type WeaponQuery

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

WeaponQuery is the builder for querying Weapon entities.

func (*WeaponQuery) All

func (wq *WeaponQuery) All(ctx context.Context) ([]*Weapon, error)

All executes the query and returns a list of Weapons.

func (*WeaponQuery) AllX

func (wq *WeaponQuery) AllX(ctx context.Context) []*Weapon

AllX is like All, but panics if an error occurs.

func (*WeaponQuery) Clone

func (wq *WeaponQuery) Clone() *WeaponQuery

Clone returns a duplicate of the WeaponQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WeaponQuery) Count

func (wq *WeaponQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WeaponQuery) CountX

func (wq *WeaponQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WeaponQuery) Exist

func (wq *WeaponQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WeaponQuery) ExistX

func (wq *WeaponQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WeaponQuery) First

func (wq *WeaponQuery) First(ctx context.Context) (*Weapon, error)

First returns the first Weapon entity from the query. Returns a *NotFoundError when no Weapon was found.

func (*WeaponQuery) FirstID

func (wq *WeaponQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Weapon ID from the query. Returns a *NotFoundError when no Weapon ID was found.

func (*WeaponQuery) FirstIDX

func (wq *WeaponQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WeaponQuery) FirstX

func (wq *WeaponQuery) FirstX(ctx context.Context) *Weapon

FirstX is like First, but panics if an error occurs.

func (*WeaponQuery) GroupBy

func (wq *WeaponQuery) GroupBy(field string, fields ...string) *WeaponGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Victim uint64 `json:"victim,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Weapon.Query().
	GroupBy(weapon.FieldVictim).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WeaponQuery) IDs

func (wq *WeaponQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Weapon IDs.

func (*WeaponQuery) IDsX

func (wq *WeaponQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WeaponQuery) Limit

func (wq *WeaponQuery) Limit(limit int) *WeaponQuery

Limit adds a limit step to the query.

func (*WeaponQuery) Modify

func (wq *WeaponQuery) Modify(modifiers ...func(s *sql.Selector)) *WeaponSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WeaponQuery) Offset

func (wq *WeaponQuery) Offset(offset int) *WeaponQuery

Offset adds an offset step to the query.

func (*WeaponQuery) Only

func (wq *WeaponQuery) Only(ctx context.Context) (*Weapon, error)

Only returns a single Weapon entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Weapon entity is found. Returns a *NotFoundError when no Weapon entities are found.

func (*WeaponQuery) OnlyID

func (wq *WeaponQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Weapon ID in the query. Returns a *NotSingularError when more than one Weapon ID is found. Returns a *NotFoundError when no entities are found.

func (*WeaponQuery) OnlyIDX

func (wq *WeaponQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WeaponQuery) OnlyX

func (wq *WeaponQuery) OnlyX(ctx context.Context) *Weapon

OnlyX is like Only, but panics if an error occurs.

func (*WeaponQuery) Order

func (wq *WeaponQuery) Order(o ...OrderFunc) *WeaponQuery

Order adds an order step to the query.

func (*WeaponQuery) QueryStat

func (wq *WeaponQuery) QueryStat() *MatchPlayerQuery

QueryStat chains the current query on the "stat" edge.

func (*WeaponQuery) Select

func (wq *WeaponQuery) Select(fields ...string) *WeaponSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Victim uint64 `json:"victim,omitempty"`
}

client.Weapon.Query().
	Select(weapon.FieldVictim).
	Scan(ctx, &v)

func (*WeaponQuery) Unique

func (wq *WeaponQuery) Unique(unique bool) *WeaponQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*WeaponQuery) Where

func (wq *WeaponQuery) Where(ps ...predicate.Weapon) *WeaponQuery

Where adds a new predicate for the WeaponQuery builder.

func (*WeaponQuery) WithStat

func (wq *WeaponQuery) WithStat(opts ...func(*MatchPlayerQuery)) *WeaponQuery

WithStat tells the query-builder to eager-load the nodes that are connected to the "stat" edge. The optional arguments are used to configure the query builder of the edge.

type WeaponSelect

type WeaponSelect struct {
	*WeaponQuery
	// contains filtered or unexported fields
}

WeaponSelect is the builder for selecting fields of Weapon entities.

func (*WeaponSelect) Bool

func (s *WeaponSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) BoolX

func (s *WeaponSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponSelect) Bools

func (s *WeaponSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) BoolsX

func (s *WeaponSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponSelect) Float64

func (s *WeaponSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) Float64X

func (s *WeaponSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponSelect) Float64s

func (s *WeaponSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) Float64sX

func (s *WeaponSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponSelect) Int

func (s *WeaponSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) IntX

func (s *WeaponSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponSelect) Ints

func (s *WeaponSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) IntsX

func (s *WeaponSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponSelect) Modify

func (ws *WeaponSelect) Modify(modifiers ...func(s *sql.Selector)) *WeaponSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WeaponSelect) Scan

func (ws *WeaponSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponSelect) ScanX

func (s *WeaponSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WeaponSelect) String

func (s *WeaponSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) StringX

func (s *WeaponSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponSelect) Strings

func (s *WeaponSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) StringsX

func (s *WeaponSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponUpdate

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

WeaponUpdate is the builder for updating Weapon entities.

func (*WeaponUpdate) AddDmg

func (wu *WeaponUpdate) AddDmg(u int) *WeaponUpdate

AddDmg adds u to the "dmg" field.

func (*WeaponUpdate) AddEqType

func (wu *WeaponUpdate) AddEqType(i int) *WeaponUpdate

AddEqType adds i to the "eq_type" field.

func (*WeaponUpdate) AddHitGroup

func (wu *WeaponUpdate) AddHitGroup(i int) *WeaponUpdate

AddHitGroup adds i to the "hit_group" field.

func (*WeaponUpdate) AddVictim

func (wu *WeaponUpdate) AddVictim(u int64) *WeaponUpdate

AddVictim adds u to the "victim" field.

func (*WeaponUpdate) ClearStat

func (wu *WeaponUpdate) ClearStat() *WeaponUpdate

ClearStat clears the "stat" edge to the MatchPlayer entity.

func (*WeaponUpdate) Exec

func (wu *WeaponUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponUpdate) ExecX

func (wu *WeaponUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponUpdate) Modify

func (wu *WeaponUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WeaponUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WeaponUpdate) Mutation

func (wu *WeaponUpdate) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponUpdate) Save

func (wu *WeaponUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WeaponUpdate) SaveX

func (wu *WeaponUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WeaponUpdate) SetDmg

func (wu *WeaponUpdate) SetDmg(u uint) *WeaponUpdate

SetDmg sets the "dmg" field.

func (*WeaponUpdate) SetEqType

func (wu *WeaponUpdate) SetEqType(i int) *WeaponUpdate

SetEqType sets the "eq_type" field.

func (*WeaponUpdate) SetHitGroup

func (wu *WeaponUpdate) SetHitGroup(i int) *WeaponUpdate

SetHitGroup sets the "hit_group" field.

func (*WeaponUpdate) SetNillableStatID

func (wu *WeaponUpdate) SetNillableStatID(id *int) *WeaponUpdate

SetNillableStatID sets the "stat" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*WeaponUpdate) SetStat

func (wu *WeaponUpdate) SetStat(m *MatchPlayer) *WeaponUpdate

SetStat sets the "stat" edge to the MatchPlayer entity.

func (*WeaponUpdate) SetStatID

func (wu *WeaponUpdate) SetStatID(id int) *WeaponUpdate

SetStatID sets the "stat" edge to the MatchPlayer entity by ID.

func (*WeaponUpdate) SetVictim

func (wu *WeaponUpdate) SetVictim(u uint64) *WeaponUpdate

SetVictim sets the "victim" field.

func (*WeaponUpdate) Where

func (wu *WeaponUpdate) Where(ps ...predicate.Weapon) *WeaponUpdate

Where appends a list predicates to the WeaponUpdate builder.

type WeaponUpdateOne

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

WeaponUpdateOne is the builder for updating a single Weapon entity.

func (*WeaponUpdateOne) AddDmg

func (wuo *WeaponUpdateOne) AddDmg(u int) *WeaponUpdateOne

AddDmg adds u to the "dmg" field.

func (*WeaponUpdateOne) AddEqType

func (wuo *WeaponUpdateOne) AddEqType(i int) *WeaponUpdateOne

AddEqType adds i to the "eq_type" field.

func (*WeaponUpdateOne) AddHitGroup

func (wuo *WeaponUpdateOne) AddHitGroup(i int) *WeaponUpdateOne

AddHitGroup adds i to the "hit_group" field.

func (*WeaponUpdateOne) AddVictim

func (wuo *WeaponUpdateOne) AddVictim(u int64) *WeaponUpdateOne

AddVictim adds u to the "victim" field.

func (*WeaponUpdateOne) ClearStat

func (wuo *WeaponUpdateOne) ClearStat() *WeaponUpdateOne

ClearStat clears the "stat" edge to the MatchPlayer entity.

func (*WeaponUpdateOne) Exec

func (wuo *WeaponUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WeaponUpdateOne) ExecX

func (wuo *WeaponUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponUpdateOne) Modify

func (wuo *WeaponUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WeaponUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WeaponUpdateOne) Mutation

func (wuo *WeaponUpdateOne) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponUpdateOne) Save

func (wuo *WeaponUpdateOne) Save(ctx context.Context) (*Weapon, error)

Save executes the query and returns the updated Weapon entity.

func (*WeaponUpdateOne) SaveX

func (wuo *WeaponUpdateOne) SaveX(ctx context.Context) *Weapon

SaveX is like Save, but panics if an error occurs.

func (*WeaponUpdateOne) Select

func (wuo *WeaponUpdateOne) Select(field string, fields ...string) *WeaponUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WeaponUpdateOne) SetDmg

func (wuo *WeaponUpdateOne) SetDmg(u uint) *WeaponUpdateOne

SetDmg sets the "dmg" field.

func (*WeaponUpdateOne) SetEqType

func (wuo *WeaponUpdateOne) SetEqType(i int) *WeaponUpdateOne

SetEqType sets the "eq_type" field.

func (*WeaponUpdateOne) SetHitGroup

func (wuo *WeaponUpdateOne) SetHitGroup(i int) *WeaponUpdateOne

SetHitGroup sets the "hit_group" field.

func (*WeaponUpdateOne) SetNillableStatID

func (wuo *WeaponUpdateOne) SetNillableStatID(id *int) *WeaponUpdateOne

SetNillableStatID sets the "stat" edge to the MatchPlayer entity by ID if the given value is not nil.

func (*WeaponUpdateOne) SetStat

func (wuo *WeaponUpdateOne) SetStat(m *MatchPlayer) *WeaponUpdateOne

SetStat sets the "stat" edge to the MatchPlayer entity.

func (*WeaponUpdateOne) SetStatID

func (wuo *WeaponUpdateOne) SetStatID(id int) *WeaponUpdateOne

SetStatID sets the "stat" edge to the MatchPlayer entity by ID.

func (*WeaponUpdateOne) SetVictim

func (wuo *WeaponUpdateOne) SetVictim(u uint64) *WeaponUpdateOne

SetVictim sets the "victim" field.

type Weapons

type Weapons []*Weapon

Weapons is a parsable slice of Weapon.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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