updated deps & regen ent
This commit is contained in:
parent
e9e3e02a39
commit
3fd0a4204b
68
ent/ent.go
68
ent/ent.go
|
@ -7,6 +7,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
|
@ -66,39 +67,35 @@ func NewTxContext(parent context.Context, tx *Tx) context.Context {
|
|||
}
|
||||
|
||||
// OrderFunc applies an ordering on the sql selector.
|
||||
// Deprecated: Use Asc/Desc functions or the package builders instead.
|
||||
type OrderFunc func(*sql.Selector)
|
||||
|
||||
// columnChecker returns a function indicates if the column exists in the given column.
|
||||
func columnChecker(table string) func(string) error {
|
||||
checks := map[string]func(string) bool{
|
||||
match.Table: match.ValidColumn,
|
||||
matchplayer.Table: matchplayer.ValidColumn,
|
||||
messages.Table: messages.ValidColumn,
|
||||
player.Table: player.ValidColumn,
|
||||
roundstats.Table: roundstats.ValidColumn,
|
||||
spray.Table: spray.ValidColumn,
|
||||
weapon.Table: weapon.ValidColumn,
|
||||
}
|
||||
check, ok := checks[table]
|
||||
if !ok {
|
||||
return func(string) error {
|
||||
return fmt.Errorf("unknown table %q", table)
|
||||
}
|
||||
}
|
||||
return func(column string) error {
|
||||
if !check(column) {
|
||||
return fmt.Errorf("unknown column %q for table %q", column, table)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
var (
|
||||
initCheck sync.Once
|
||||
columnCheck sql.ColumnCheck
|
||||
)
|
||||
|
||||
// columnChecker checks if the column exists in the given table.
|
||||
func checkColumn(table, column string) error {
|
||||
initCheck.Do(func() {
|
||||
columnCheck = sql.NewColumnCheck(map[string]func(string) bool{
|
||||
match.Table: match.ValidColumn,
|
||||
matchplayer.Table: matchplayer.ValidColumn,
|
||||
messages.Table: messages.ValidColumn,
|
||||
player.Table: player.ValidColumn,
|
||||
roundstats.Table: roundstats.ValidColumn,
|
||||
spray.Table: spray.ValidColumn,
|
||||
weapon.Table: weapon.ValidColumn,
|
||||
})
|
||||
})
|
||||
return columnCheck(table, column)
|
||||
}
|
||||
|
||||
// Asc applies the given fields in ASC order.
|
||||
func Asc(fields ...string) OrderFunc {
|
||||
func Asc(fields ...string) func(*sql.Selector) {
|
||||
return func(s *sql.Selector) {
|
||||
check := columnChecker(s.TableName())
|
||||
for _, f := range fields {
|
||||
if err := check(f); err != nil {
|
||||
if err := checkColumn(s.TableName(), f); err != nil {
|
||||
s.AddError(&ValidationError{Name: f, err: fmt.Errorf("ent: %w", err)})
|
||||
}
|
||||
s.OrderBy(sql.Asc(s.C(f)))
|
||||
|
@ -107,11 +104,10 @@ func Asc(fields ...string) OrderFunc {
|
|||
}
|
||||
|
||||
// Desc applies the given fields in DESC order.
|
||||
func Desc(fields ...string) OrderFunc {
|
||||
func Desc(fields ...string) func(*sql.Selector) {
|
||||
return func(s *sql.Selector) {
|
||||
check := columnChecker(s.TableName())
|
||||
for _, f := range fields {
|
||||
if err := check(f); err != nil {
|
||||
if err := checkColumn(s.TableName(), f); err != nil {
|
||||
s.AddError(&ValidationError{Name: f, err: fmt.Errorf("ent: %w", err)})
|
||||
}
|
||||
s.OrderBy(sql.Desc(s.C(f)))
|
||||
|
@ -143,8 +139,7 @@ func Count() AggregateFunc {
|
|||
// Max applies the "max" aggregation function on the given field of each group.
|
||||
func Max(field string) AggregateFunc {
|
||||
return func(s *sql.Selector) string {
|
||||
check := columnChecker(s.TableName())
|
||||
if err := check(field); err != nil {
|
||||
if err := checkColumn(s.TableName(), field); err != nil {
|
||||
s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)})
|
||||
return ""
|
||||
}
|
||||
|
@ -155,8 +150,7 @@ func Max(field string) AggregateFunc {
|
|||
// Mean applies the "mean" aggregation function on the given field of each group.
|
||||
func Mean(field string) AggregateFunc {
|
||||
return func(s *sql.Selector) string {
|
||||
check := columnChecker(s.TableName())
|
||||
if err := check(field); err != nil {
|
||||
if err := checkColumn(s.TableName(), field); err != nil {
|
||||
s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)})
|
||||
return ""
|
||||
}
|
||||
|
@ -167,8 +161,7 @@ func Mean(field string) AggregateFunc {
|
|||
// Min applies the "min" aggregation function on the given field of each group.
|
||||
func Min(field string) AggregateFunc {
|
||||
return func(s *sql.Selector) string {
|
||||
check := columnChecker(s.TableName())
|
||||
if err := check(field); err != nil {
|
||||
if err := checkColumn(s.TableName(), field); err != nil {
|
||||
s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)})
|
||||
return ""
|
||||
}
|
||||
|
@ -179,8 +172,7 @@ func Min(field string) AggregateFunc {
|
|||
// Sum applies the "sum" aggregation function on the given field of each group.
|
||||
func Sum(field string) AggregateFunc {
|
||||
return func(s *sql.Selector) string {
|
||||
check := columnChecker(s.TableName())
|
||||
if err := check(field); err != nil {
|
||||
if err := checkColumn(s.TableName(), field); err != nil {
|
||||
s.AddError(&ValidationError{Name: field, err: fmt.Errorf("ent: %w", err)})
|
||||
return ""
|
||||
}
|
||||
|
@ -517,7 +509,7 @@ func withHooks[V Value, M any, PM interface {
|
|||
return exec(ctx)
|
||||
}
|
||||
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
|
||||
mutationT, ok := m.(PM)
|
||||
mutationT, ok := any(m).(PM)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T", m)
|
||||
}
|
||||
|
|
14
ent/match.go
14
ent/match.go
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/match"
|
||||
)
|
||||
|
@ -46,7 +47,8 @@ type Match struct {
|
|||
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"`
|
||||
Edges MatchEdges `json:"edges"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// MatchEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -96,7 +98,7 @@ func (*Match) scanValues(columns []string) ([]any, error) {
|
|||
case match.FieldDate:
|
||||
values[i] = new(sql.NullTime)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Match", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -200,11 +202,19 @@ func (m *Match) assignValues(columns []string, values []any) error {
|
|||
} else if value.Valid {
|
||||
m.TickRate = value.Float64
|
||||
}
|
||||
default:
|
||||
m.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Match.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (m *Match) Value(name string) (ent.Value, error) {
|
||||
return m.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryStats queries the "stats" edge of the Match entity.
|
||||
func (m *Match) QueryStats() *MatchPlayerQuery {
|
||||
return NewMatchClient(m.config).QueryStats(m)
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
package match
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the match type in the database.
|
||||
Label = "match"
|
||||
|
@ -98,3 +103,118 @@ var (
|
|||
// DefaultGamebanPresent holds the default value on creation for the "gameban_present" field.
|
||||
DefaultGamebanPresent bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Match queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByShareCode orders the results by the share_code field.
|
||||
func ByShareCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShareCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMap orders the results by the map field.
|
||||
func ByMap(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMap, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDate orders the results by the date field.
|
||||
func ByDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScoreTeamA orders the results by the score_team_a field.
|
||||
func ByScoreTeamA(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScoreTeamA, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScoreTeamB orders the results by the score_team_b field.
|
||||
func ByScoreTeamB(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScoreTeamB, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReplayURL orders the results by the replay_url field.
|
||||
func ByReplayURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReplayURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDuration orders the results by the duration field.
|
||||
func ByDuration(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDuration, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchResult orders the results by the match_result field.
|
||||
func ByMatchResult(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMatchResult, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaxRounds orders the results by the max_rounds field.
|
||||
func ByMaxRounds(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaxRounds, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDemoParsed orders the results by the demo_parsed field.
|
||||
func ByDemoParsed(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDemoParsed, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVacPresent orders the results by the vac_present field.
|
||||
func ByVacPresent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVacPresent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGamebanPresent orders the results by the gameban_present field.
|
||||
func ByGamebanPresent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGamebanPresent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTickRate orders the results by the tick_rate field.
|
||||
func ByTickRate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTickRate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatsCount orders the results by stats count.
|
||||
func ByStatsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newStatsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByStats orders the results by stats terms.
|
||||
func ByStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByPlayersCount orders the results by players count.
|
||||
func ByPlayersCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newPlayersStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByPlayers orders the results by players terms.
|
||||
func ByPlayers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newPlayersStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newStatsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
||||
)
|
||||
}
|
||||
func newPlayersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(PlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, PlayersTable, PlayersPrimaryKey...),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -724,11 +724,7 @@ func HasStats() predicate.Match {
|
|||
// HasStatsWith applies the HasEdge predicate on the "stats" edge with a given conditions (other predicates).
|
||||
func HasStatsWith(preds ...predicate.MatchPlayer) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
||||
)
|
||||
step := newStatsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -751,11 +747,7 @@ func HasPlayers() predicate.Match {
|
|||
// HasPlayersWith applies the HasEdge predicate on the "players" edge with a given conditions (other predicates).
|
||||
func HasPlayersWith(preds ...predicate.Player) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(PlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, PlayersTable, PlayersPrimaryKey...),
|
||||
)
|
||||
step := newPlayersStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -198,7 +198,7 @@ func (mc *MatchCreate) Mutation() *MatchMutation {
|
|||
// Save creates the Match in the database.
|
||||
func (mc *MatchCreate) Save(ctx context.Context) (*Match, error) {
|
||||
mc.defaults()
|
||||
return withHooks[*Match, MatchMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks)
|
||||
return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -367,10 +367,7 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -386,10 +383,7 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -424,8 +418,8 @@ func (mcb *MatchCreateBulk) Save(ctx context.Context) ([]*Match, error) {
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, mcb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (md *MatchDelete) Where(ps ...predicate.Match) *MatchDelete {
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (md *MatchDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MatchMutation](ctx, md.sqlExec, md.mutation, md.hooks)
|
||||
return withHooks(ctx, md.sqlExec, md.mutation, md.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
type MatchQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []match.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Match
|
||||
withStats *MatchPlayerQuery
|
||||
|
@ -58,7 +58,7 @@ func (mq *MatchQuery) Unique(unique bool) *MatchQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (mq *MatchQuery) Order(o ...OrderFunc) *MatchQuery {
|
||||
func (mq *MatchQuery) Order(o ...match.OrderOption) *MatchQuery {
|
||||
mq.order = append(mq.order, o...)
|
||||
return mq
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ func (mq *MatchQuery) Clone() *MatchQuery {
|
|||
return &MatchQuery{
|
||||
config: mq.config,
|
||||
ctx: mq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, mq.order...),
|
||||
order: append([]match.OrderOption{}, mq.order...),
|
||||
inters: append([]Interceptor{}, mq.inters...),
|
||||
predicates: append([]predicate.Match{}, mq.predicates...),
|
||||
withStats: mq.withStats.Clone(),
|
||||
|
@ -460,8 +460,11 @@ func (mq *MatchQuery) loadStats(ctx context.Context, query *MatchPlayerQuery, no
|
|||
init(nodes[i])
|
||||
}
|
||||
}
|
||||
if len(query.ctx.Fields) > 0 {
|
||||
query.ctx.AppendFieldOnce(matchplayer.FieldMatchStats)
|
||||
}
|
||||
query.Where(predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(match.StatsColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(match.StatsColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -471,7 +474,7 @@ func (mq *MatchQuery) loadStats(ctx context.Context, query *MatchPlayerQuery, no
|
|||
fk := n.MatchStats
|
||||
node, ok := nodeids[fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "match_stats" returned %v for node %v`, fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "match_stats" returned %v for node %v`, fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ func (mu *MatchUpdate) RemovePlayers(p ...*Player) *MatchUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (mu *MatchUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MatchMutation](ctx, mu.sqlSave, mu.mutation, mu.hooks)
|
||||
return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -428,10 +428,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -444,10 +441,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -463,10 +457,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -482,10 +473,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -498,10 +486,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -517,10 +502,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -840,7 +822,7 @@ func (muo *MatchUpdateOne) Select(field string, fields ...string) *MatchUpdateOn
|
|||
|
||||
// Save executes the query and returns the updated Match entity.
|
||||
func (muo *MatchUpdateOne) Save(ctx context.Context) (*Match, error) {
|
||||
return withHooks[*Match, MatchMutation](ctx, muo.sqlSave, muo.mutation, muo.hooks)
|
||||
return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -977,10 +959,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -993,10 +972,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1012,10 +988,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: []string{match.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1031,10 +1004,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1047,10 +1017,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1066,10 +1033,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
|||
Columns: match.PlayersPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/match"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
|
||||
|
@ -85,7 +86,8 @@ type MatchPlayer struct {
|
|||
AvgPing float64 `json:"avg_ping,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"`
|
||||
Edges MatchPlayerEdges `json:"edges"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// MatchPlayerEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -181,7 +183,7 @@ func (*MatchPlayer) scanValues(columns []string) ([]any, error) {
|
|||
case matchplayer.FieldCrosshair, matchplayer.FieldColor:
|
||||
values[i] = new(sql.NullString)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type MatchPlayer", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -399,11 +401,19 @@ func (mp *MatchPlayer) assignValues(columns []string, values []any) error {
|
|||
} else if value.Valid {
|
||||
mp.AvgPing = value.Float64
|
||||
}
|
||||
default:
|
||||
mp.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the MatchPlayer.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (mp *MatchPlayer) Value(name string) (ent.Value, error) {
|
||||
return mp.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryMatches queries the "matches" edge of the MatchPlayer entity.
|
||||
func (mp *MatchPlayer) QueryMatches() *MatchQuery {
|
||||
return NewMatchPlayerClient(mp.config).QueryMatches(mp)
|
||||
|
|
|
@ -4,6 +4,9 @@ package matchplayer
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -209,3 +212,288 @@ func ColorValidator(c Color) error {
|
|||
return fmt.Errorf("matchplayer: invalid enum value for color field: %q", c)
|
||||
}
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the MatchPlayer queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTeamID orders the results by the team_id field.
|
||||
func ByTeamID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTeamID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByKills orders the results by the kills field.
|
||||
func ByKills(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldKills, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeaths orders the results by the deaths field.
|
||||
func ByDeaths(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeaths, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAssists orders the results by the assists field.
|
||||
func ByAssists(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAssists, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHeadshot orders the results by the headshot field.
|
||||
func ByHeadshot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHeadshot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMvp orders the results by the mvp field.
|
||||
func ByMvp(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMvp, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScore orders the results by the score field.
|
||||
func ByScore(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScore, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRankNew orders the results by the rank_new field.
|
||||
func ByRankNew(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRankNew, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRankOld orders the results by the rank_old field.
|
||||
func ByRankOld(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRankOld, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMk2 orders the results by the mk_2 field.
|
||||
func ByMk2(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMk2, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMk3 orders the results by the mk_3 field.
|
||||
func ByMk3(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMk3, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMk4 orders the results by the mk_4 field.
|
||||
func ByMk4(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMk4, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMk5 orders the results by the mk_5 field.
|
||||
func ByMk5(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMk5, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDmgEnemy orders the results by the dmg_enemy field.
|
||||
func ByDmgEnemy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDmgEnemy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDmgTeam orders the results by the dmg_team field.
|
||||
func ByDmgTeam(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDmgTeam, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUdHe orders the results by the ud_he field.
|
||||
func ByUdHe(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUdHe, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUdFlames orders the results by the ud_flames field.
|
||||
func ByUdFlames(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUdFlames, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUdFlash orders the results by the ud_flash field.
|
||||
func ByUdFlash(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUdFlash, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUdDecoy orders the results by the ud_decoy field.
|
||||
func ByUdDecoy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUdDecoy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUdSmoke orders the results by the ud_smoke field.
|
||||
func ByUdSmoke(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUdSmoke, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCrosshair orders the results by the crosshair field.
|
||||
func ByCrosshair(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCrosshair, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByColor orders the results by the color field.
|
||||
func ByColor(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldColor, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByKast orders the results by the kast field.
|
||||
func ByKast(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldKast, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashDurationSelf orders the results by the flash_duration_self field.
|
||||
func ByFlashDurationSelf(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashDurationSelf, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashDurationTeam orders the results by the flash_duration_team field.
|
||||
func ByFlashDurationTeam(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashDurationTeam, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashDurationEnemy orders the results by the flash_duration_enemy field.
|
||||
func ByFlashDurationEnemy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashDurationEnemy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashTotalSelf orders the results by the flash_total_self field.
|
||||
func ByFlashTotalSelf(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashTotalSelf, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashTotalTeam orders the results by the flash_total_team field.
|
||||
func ByFlashTotalTeam(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashTotalTeam, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashTotalEnemy orders the results by the flash_total_enemy field.
|
||||
func ByFlashTotalEnemy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashTotalEnemy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchStats orders the results by the match_stats field.
|
||||
func ByMatchStats(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMatchStats, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPlayerStats orders the results by the player_stats field.
|
||||
func ByPlayerStats(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPlayerStats, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlashAssists orders the results by the flash_assists field.
|
||||
func ByFlashAssists(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlashAssists, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAvgPing orders the results by the avg_ping field.
|
||||
func ByAvgPing(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAvgPing, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchesField orders the results by matches field.
|
||||
func ByMatchesField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchesStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByPlayersField orders the results by players field.
|
||||
func ByPlayersField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newPlayersStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByWeaponStatsCount orders the results by weapon_stats count.
|
||||
func ByWeaponStatsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newWeaponStatsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByWeaponStats orders the results by weapon_stats terms.
|
||||
func ByWeaponStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newWeaponStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByRoundStatsCount orders the results by round_stats count.
|
||||
func ByRoundStatsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newRoundStatsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByRoundStats orders the results by round_stats terms.
|
||||
func ByRoundStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newRoundStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySprayCount orders the results by spray count.
|
||||
func BySprayCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newSprayStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySpray orders the results by spray terms.
|
||||
func BySpray(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newSprayStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMessagesCount orders the results by messages count.
|
||||
func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newMessagesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMessages orders the results by messages terms.
|
||||
func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMessagesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newMatchesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchesTable, MatchesColumn),
|
||||
)
|
||||
}
|
||||
func newPlayersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(PlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, PlayersTable, PlayersColumn),
|
||||
)
|
||||
}
|
||||
func newWeaponStatsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(WeaponStatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, WeaponStatsTable, WeaponStatsColumn),
|
||||
)
|
||||
}
|
||||
func newRoundStatsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(RoundStatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, RoundStatsTable, RoundStatsColumn),
|
||||
)
|
||||
}
|
||||
func newSprayStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(SprayInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SprayTable, SprayColumn),
|
||||
)
|
||||
}
|
||||
func newMessagesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MessagesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MessagesTable, MessagesColumn),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1772,11 +1772,7 @@ func HasMatches() predicate.MatchPlayer {
|
|||
// HasMatchesWith applies the HasEdge predicate on the "matches" edge with a given conditions (other predicates).
|
||||
func HasMatchesWith(preds ...predicate.Match) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchesTable, MatchesColumn),
|
||||
)
|
||||
step := newMatchesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1799,11 +1795,7 @@ func HasPlayers() predicate.MatchPlayer {
|
|||
// HasPlayersWith applies the HasEdge predicate on the "players" edge with a given conditions (other predicates).
|
||||
func HasPlayersWith(preds ...predicate.Player) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(PlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, PlayersTable, PlayersColumn),
|
||||
)
|
||||
step := newPlayersStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1826,11 +1818,7 @@ func HasWeaponStats() predicate.MatchPlayer {
|
|||
// HasWeaponStatsWith applies the HasEdge predicate on the "weapon_stats" edge with a given conditions (other predicates).
|
||||
func HasWeaponStatsWith(preds ...predicate.Weapon) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(WeaponStatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, WeaponStatsTable, WeaponStatsColumn),
|
||||
)
|
||||
step := newWeaponStatsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1853,11 +1841,7 @@ func HasRoundStats() predicate.MatchPlayer {
|
|||
// HasRoundStatsWith applies the HasEdge predicate on the "round_stats" edge with a given conditions (other predicates).
|
||||
func HasRoundStatsWith(preds ...predicate.RoundStats) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(RoundStatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, RoundStatsTable, RoundStatsColumn),
|
||||
)
|
||||
step := newRoundStatsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1880,11 +1864,7 @@ func HasSpray() predicate.MatchPlayer {
|
|||
// HasSprayWith applies the HasEdge predicate on the "spray" edge with a given conditions (other predicates).
|
||||
func HasSprayWith(preds ...predicate.Spray) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(SprayInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SprayTable, SprayColumn),
|
||||
)
|
||||
step := newSprayStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1907,11 +1887,7 @@ func HasMessages() predicate.MatchPlayer {
|
|||
// HasMessagesWith applies the HasEdge predicate on the "messages" edge with a given conditions (other predicates).
|
||||
func HasMessagesWith(preds ...predicate.Messages) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MessagesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MessagesTable, MessagesColumn),
|
||||
)
|
||||
step := newMessagesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -536,7 +536,7 @@ func (mpc *MatchPlayerCreate) Mutation() *MatchPlayerMutation {
|
|||
|
||||
// Save creates the MatchPlayer in the database.
|
||||
func (mpc *MatchPlayerCreate) Save(ctx context.Context) (*MatchPlayer, error) {
|
||||
return withHooks[*MatchPlayer, MatchPlayerMutation](ctx, mpc.sqlSave, mpc.mutation, mpc.hooks)
|
||||
return withHooks(ctx, mpc.sqlSave, mpc.mutation, mpc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -747,10 +747,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.MatchesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -767,10 +764,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.PlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -787,10 +781,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -806,10 +797,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -825,10 +813,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -844,10 +829,7 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -881,8 +863,8 @@ func (mpcb *MatchPlayerCreateBulk) Save(ctx context.Context) ([]*MatchPlayer, er
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, mpcb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (mpd *MatchPlayerDelete) Where(ps ...predicate.MatchPlayer) *MatchPlayerDel
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (mpd *MatchPlayerDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MatchPlayerMutation](ctx, mpd.sqlExec, mpd.mutation, mpd.hooks)
|
||||
return withHooks(ctx, mpd.sqlExec, mpd.mutation, mpd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
type MatchPlayerQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []matchplayer.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.MatchPlayer
|
||||
withMatches *MatchQuery
|
||||
|
@ -66,7 +66,7 @@ func (mpq *MatchPlayerQuery) Unique(unique bool) *MatchPlayerQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (mpq *MatchPlayerQuery) Order(o ...OrderFunc) *MatchPlayerQuery {
|
||||
func (mpq *MatchPlayerQuery) Order(o ...matchplayer.OrderOption) *MatchPlayerQuery {
|
||||
mpq.order = append(mpq.order, o...)
|
||||
return mpq
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ func (mpq *MatchPlayerQuery) Clone() *MatchPlayerQuery {
|
|||
return &MatchPlayerQuery{
|
||||
config: mpq.config,
|
||||
ctx: mpq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, mpq.order...),
|
||||
order: append([]matchplayer.OrderOption{}, mpq.order...),
|
||||
inters: append([]Interceptor{}, mpq.inters...),
|
||||
predicates: append([]predicate.MatchPlayer{}, mpq.predicates...),
|
||||
withMatches: mpq.withMatches.Clone(),
|
||||
|
@ -694,7 +694,7 @@ func (mpq *MatchPlayerQuery) loadWeaponStats(ctx context.Context, query *WeaponQ
|
|||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.Weapon(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(matchplayer.WeaponStatsColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(matchplayer.WeaponStatsColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -707,7 +707,7 @@ func (mpq *MatchPlayerQuery) loadWeaponStats(ctx context.Context, query *WeaponQ
|
|||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "match_player_weapon_stats" returned %v for node %v`, *fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "match_player_weapon_stats" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ func (mpq *MatchPlayerQuery) loadRoundStats(ctx context.Context, query *RoundSta
|
|||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(matchplayer.RoundStatsColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(matchplayer.RoundStatsColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -738,7 +738,7 @@ func (mpq *MatchPlayerQuery) loadRoundStats(ctx context.Context, query *RoundSta
|
|||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "match_player_round_stats" returned %v for node %v`, *fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "match_player_round_stats" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ func (mpq *MatchPlayerQuery) loadSpray(ctx context.Context, query *SprayQuery, n
|
|||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.Spray(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(matchplayer.SprayColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(matchplayer.SprayColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -769,7 +769,7 @@ func (mpq *MatchPlayerQuery) loadSpray(ctx context.Context, query *SprayQuery, n
|
|||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "match_player_spray" returned %v for node %v`, *fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "match_player_spray" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ func (mpq *MatchPlayerQuery) loadMessages(ctx context.Context, query *MessagesQu
|
|||
}
|
||||
query.withFKs = true
|
||||
query.Where(predicate.Messages(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(matchplayer.MessagesColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(matchplayer.MessagesColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -800,7 +800,7 @@ func (mpq *MatchPlayerQuery) loadMessages(ctx context.Context, query *MessagesQu
|
|||
}
|
||||
node, ok := nodeids[*fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "match_player_messages" returned %v for node %v`, *fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "match_player_messages" returned %v for node %v`, *fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
@ -835,6 +835,12 @@ func (mpq *MatchPlayerQuery) querySpec() *sqlgraph.QuerySpec {
|
|||
_spec.Node.Columns = append(_spec.Node.Columns, fields[i])
|
||||
}
|
||||
}
|
||||
if mpq.withMatches != nil {
|
||||
_spec.Node.AddColumnOnce(matchplayer.FieldMatchStats)
|
||||
}
|
||||
if mpq.withPlayers != nil {
|
||||
_spec.Node.AddColumnOnce(matchplayer.FieldPlayerStats)
|
||||
}
|
||||
}
|
||||
if ps := mpq.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
|
|
|
@ -1000,7 +1000,7 @@ func (mpu *MatchPlayerUpdate) RemoveMessages(m ...*Messages) *MatchPlayerUpdate
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (mpu *MatchPlayerUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MatchPlayerMutation](ctx, mpu.sqlSave, mpu.mutation, mpu.hooks)
|
||||
return withHooks(ctx, mpu.sqlSave, mpu.mutation, mpu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -1313,10 +1313,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.MatchesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1329,10 +1326,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.MatchesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1348,10 +1342,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.PlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1364,10 +1355,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.PlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1383,10 +1371,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1399,10 +1384,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1418,10 +1400,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1437,10 +1416,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1453,10 +1429,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1472,10 +1445,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1491,10 +1461,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1507,10 +1474,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1526,10 +1490,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1545,10 +1506,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1561,10 +1519,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1580,10 +1535,7 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -2592,7 +2544,7 @@ func (mpuo *MatchPlayerUpdateOne) Select(field string, fields ...string) *MatchP
|
|||
|
||||
// Save executes the query and returns the updated MatchPlayer entity.
|
||||
func (mpuo *MatchPlayerUpdateOne) Save(ctx context.Context) (*MatchPlayer, error) {
|
||||
return withHooks[*MatchPlayer, MatchPlayerMutation](ctx, mpuo.sqlSave, mpuo.mutation, mpuo.hooks)
|
||||
return withHooks(ctx, mpuo.sqlSave, mpuo.mutation, mpuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -2922,10 +2874,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.MatchesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -2938,10 +2887,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.MatchesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -2957,10 +2903,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.PlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -2973,10 +2916,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.PlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: player.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(player.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -2992,10 +2932,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -3008,10 +2945,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3027,10 +2961,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.WeaponStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: weapon.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(weapon.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3046,10 +2977,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -3062,10 +2990,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3081,10 +3006,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.RoundStatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: roundstats.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(roundstats.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3100,10 +3022,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -3116,10 +3035,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3135,10 +3051,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.SprayColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: spray.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(spray.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3154,10 +3067,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -3170,10 +3080,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -3189,10 +3096,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
|||
Columns: []string{matchplayer.MessagesColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: messages.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/messages"
|
||||
|
@ -26,6 +27,7 @@ type Messages struct {
|
|||
// The values are being populated by the MessagesQuery when eager-loading is set.
|
||||
Edges MessagesEdges `json:"edges"`
|
||||
match_player_messages *int
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// MessagesEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -64,7 +66,7 @@ func (*Messages) scanValues(columns []string) ([]any, error) {
|
|||
case messages.ForeignKeys[0]: // match_player_messages
|
||||
values[i] = new(sql.NullInt64)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Messages", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -109,11 +111,19 @@ func (m *Messages) assignValues(columns []string, values []any) error {
|
|||
m.match_player_messages = new(int)
|
||||
*m.match_player_messages = int(value.Int64)
|
||||
}
|
||||
default:
|
||||
m.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Messages.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (m *Messages) Value(name string) (ent.Value, error) {
|
||||
return m.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryMatchPlayer queries the "match_player" edge of the Messages entity.
|
||||
func (m *Messages) QueryMatchPlayer() *MatchPlayerQuery {
|
||||
return NewMessagesClient(m.config).QueryMatchPlayer(m)
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
package messages
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the messages type in the database.
|
||||
Label = "messages"
|
||||
|
@ -54,3 +59,40 @@ func ValidColumn(column string) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Messages queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMessage orders the results by the message field.
|
||||
func ByMessage(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMessage, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllChat orders the results by the all_chat field.
|
||||
func ByAllChat(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllChat, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTick orders the results by the tick field.
|
||||
func ByTick(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTick, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchPlayerField orders the results by match_player field.
|
||||
func ByMatchPlayerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchPlayerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newMatchPlayerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -197,11 +197,7 @@ func HasMatchPlayer() predicate.Messages {
|
|||
// HasMatchPlayerWith applies the HasEdge predicate on the "match_player" edge with a given conditions (other predicates).
|
||||
func HasMatchPlayerWith(preds ...predicate.MatchPlayer) predicate.Messages {
|
||||
return predicate.Messages(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
step := newMatchPlayerStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -64,7 +64,7 @@ func (mc *MessagesCreate) Mutation() *MessagesMutation {
|
|||
|
||||
// Save creates the Messages in the database.
|
||||
func (mc *MessagesCreate) Save(ctx context.Context) (*Messages, error) {
|
||||
return withHooks[*Messages, MessagesMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks)
|
||||
return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -146,10 +146,7 @@ func (mc *MessagesCreate) createSpec() (*Messages, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{messages.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -184,8 +181,8 @@ func (mcb *MessagesCreateBulk) Save(ctx context.Context) ([]*Messages, error) {
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, mcb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (md *MessagesDelete) Where(ps ...predicate.Messages) *MessagesDelete {
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (md *MessagesDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MessagesMutation](ctx, md.sqlExec, md.mutation, md.hooks)
|
||||
return withHooks(ctx, md.sqlExec, md.mutation, md.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
type MessagesQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []messages.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Messages
|
||||
withMatchPlayer *MatchPlayerQuery
|
||||
|
@ -56,7 +56,7 @@ func (mq *MessagesQuery) Unique(unique bool) *MessagesQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (mq *MessagesQuery) Order(o ...OrderFunc) *MessagesQuery {
|
||||
func (mq *MessagesQuery) Order(o ...messages.OrderOption) *MessagesQuery {
|
||||
mq.order = append(mq.order, o...)
|
||||
return mq
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ func (mq *MessagesQuery) Clone() *MessagesQuery {
|
|||
return &MessagesQuery{
|
||||
config: mq.config,
|
||||
ctx: mq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, mq.order...),
|
||||
order: append([]messages.OrderOption{}, mq.order...),
|
||||
inters: append([]Interceptor{}, mq.inters...),
|
||||
predicates: append([]predicate.Messages{}, mq.predicates...),
|
||||
withMatchPlayer: mq.withMatchPlayer.Clone(),
|
||||
|
|
|
@ -86,7 +86,7 @@ func (mu *MessagesUpdate) ClearMatchPlayer() *MessagesUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (mu *MessagesUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, MessagesMutation](ctx, mu.sqlSave, mu.mutation, mu.hooks)
|
||||
return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -146,10 +146,7 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{messages.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -162,10 +159,7 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{messages.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -265,7 +259,7 @@ func (muo *MessagesUpdateOne) Select(field string, fields ...string) *MessagesUp
|
|||
|
||||
// Save executes the query and returns the updated Messages entity.
|
||||
func (muo *MessagesUpdateOne) Save(ctx context.Context) (*Messages, error) {
|
||||
return withHooks[*Messages, MessagesMutation](ctx, muo.sqlSave, muo.mutation, muo.hooks)
|
||||
return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -342,10 +336,7 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
|||
Columns: []string{messages.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -358,10 +349,7 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
|||
Columns: []string{messages.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/player"
|
||||
)
|
||||
|
@ -50,7 +51,8 @@ type Player struct {
|
|||
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"`
|
||||
Edges PlayerEdges `json:"edges"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// PlayerEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -94,7 +96,7 @@ func (*Player) scanValues(columns []string) ([]any, error) {
|
|||
case player.FieldVacDate, player.FieldGameBanDate, player.FieldSteamUpdated, player.FieldSharecodeUpdated, player.FieldProfileCreated:
|
||||
values[i] = new(sql.NullTime)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Player", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -210,11 +212,19 @@ func (pl *Player) assignValues(columns []string, values []any) error {
|
|||
} else if value.Valid {
|
||||
pl.Ties = int(value.Int64)
|
||||
}
|
||||
default:
|
||||
pl.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Player.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (pl *Player) Value(name string) (ent.Value, error) {
|
||||
return pl.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryStats queries the "stats" edge of the Player entity.
|
||||
func (pl *Player) QueryStats() *MatchPlayerQuery {
|
||||
return NewPlayerClient(pl.config).QueryStats(pl)
|
||||
|
|
|
@ -4,6 +4,9 @@ package player
|
|||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -104,3 +107,133 @@ var (
|
|||
// DefaultSteamUpdated holds the default value on creation for the "steam_updated" field.
|
||||
DefaultSteamUpdated func() time.Time
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Player queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAvatar orders the results by the avatar field.
|
||||
func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAvatar, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVanityURL orders the results by the vanity_url field.
|
||||
func ByVanityURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVanityURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVanityURLReal orders the results by the vanity_url_real field.
|
||||
func ByVanityURLReal(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVanityURLReal, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVacDate orders the results by the vac_date field.
|
||||
func ByVacDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVacDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVacCount orders the results by the vac_count field.
|
||||
func ByVacCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVacCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameBanDate orders the results by the game_ban_date field.
|
||||
func ByGameBanDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameBanDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameBanCount orders the results by the game_ban_count field.
|
||||
func ByGameBanCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameBanCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySteamUpdated orders the results by the steam_updated field.
|
||||
func BySteamUpdated(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSteamUpdated, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySharecodeUpdated orders the results by the sharecode_updated field.
|
||||
func BySharecodeUpdated(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSharecodeUpdated, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAuthCode orders the results by the auth_code field.
|
||||
func ByAuthCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAuthCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProfileCreated orders the results by the profile_created field.
|
||||
func ByProfileCreated(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProfileCreated, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOldestSharecodeSeen orders the results by the oldest_sharecode_seen field.
|
||||
func ByOldestSharecodeSeen(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOldestSharecodeSeen, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWins orders the results by the wins field.
|
||||
func ByWins(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWins, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLooses orders the results by the looses field.
|
||||
func ByLooses(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLooses, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTies orders the results by the ties field.
|
||||
func ByTies(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTies, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatsCount orders the results by stats count.
|
||||
func ByStatsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newStatsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByStats orders the results by stats terms.
|
||||
func ByStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMatchesCount orders the results by matches count.
|
||||
func ByMatchesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newMatchesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMatches orders the results by matches terms.
|
||||
func ByMatches(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newStatsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
||||
)
|
||||
}
|
||||
func newMatchesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, false, MatchesTable, MatchesPrimaryKey...),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1089,11 +1089,7 @@ func HasStats() predicate.Player {
|
|||
// HasStatsWith applies the HasEdge predicate on the "stats" edge with a given conditions (other predicates).
|
||||
func HasStatsWith(preds ...predicate.MatchPlayer) predicate.Player {
|
||||
return predicate.Player(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
||||
)
|
||||
step := newStatsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
@ -1116,11 +1112,7 @@ func HasMatches() predicate.Player {
|
|||
// HasMatchesWith applies the HasEdge predicate on the "matches" edge with a given conditions (other predicates).
|
||||
func HasMatchesWith(preds ...predicate.Match) predicate.Player {
|
||||
return predicate.Player(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, false, MatchesTable, MatchesPrimaryKey...),
|
||||
)
|
||||
step := newMatchesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -290,7 +290,7 @@ func (pc *PlayerCreate) Mutation() *PlayerMutation {
|
|||
// Save creates the Player in the database.
|
||||
func (pc *PlayerCreate) Save(ctx context.Context) (*Player, error) {
|
||||
pc.defaults()
|
||||
return withHooks[*Player, PlayerMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks)
|
||||
return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -432,10 +432,7 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -451,10 +448,7 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -489,8 +483,8 @@ func (pcb *PlayerCreateBulk) Save(ctx context.Context) ([]*Player, error) {
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, pcb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (pd *PlayerDelete) Where(ps ...predicate.Player) *PlayerDelete {
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (pd *PlayerDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, PlayerMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks)
|
||||
return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
type PlayerQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []player.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Player
|
||||
withStats *MatchPlayerQuery
|
||||
|
@ -58,7 +58,7 @@ func (pq *PlayerQuery) Unique(unique bool) *PlayerQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (pq *PlayerQuery) Order(o ...OrderFunc) *PlayerQuery {
|
||||
func (pq *PlayerQuery) Order(o ...player.OrderOption) *PlayerQuery {
|
||||
pq.order = append(pq.order, o...)
|
||||
return pq
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ func (pq *PlayerQuery) Clone() *PlayerQuery {
|
|||
return &PlayerQuery{
|
||||
config: pq.config,
|
||||
ctx: pq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, pq.order...),
|
||||
order: append([]player.OrderOption{}, pq.order...),
|
||||
inters: append([]Interceptor{}, pq.inters...),
|
||||
predicates: append([]predicate.Player{}, pq.predicates...),
|
||||
withStats: pq.withStats.Clone(),
|
||||
|
@ -460,8 +460,11 @@ func (pq *PlayerQuery) loadStats(ctx context.Context, query *MatchPlayerQuery, n
|
|||
init(nodes[i])
|
||||
}
|
||||
}
|
||||
if len(query.ctx.Fields) > 0 {
|
||||
query.ctx.AppendFieldOnce(matchplayer.FieldPlayerStats)
|
||||
}
|
||||
query.Where(predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
s.Where(sql.InValues(player.StatsColumn, fks...))
|
||||
s.Where(sql.InValues(s.C(player.StatsColumn), fks...))
|
||||
}))
|
||||
neighbors, err := query.All(ctx)
|
||||
if err != nil {
|
||||
|
@ -471,7 +474,7 @@ func (pq *PlayerQuery) loadStats(ctx context.Context, query *MatchPlayerQuery, n
|
|||
fk := n.PlayerStats
|
||||
node, ok := nodeids[fk]
|
||||
if !ok {
|
||||
return fmt.Errorf(`unexpected foreign-key "player_stats" returned %v for node %v`, fk, n.ID)
|
||||
return fmt.Errorf(`unexpected referenced foreign-key "player_stats" returned %v for node %v`, fk, n.ID)
|
||||
}
|
||||
assign(node, n)
|
||||
}
|
||||
|
|
|
@ -459,7 +459,7 @@ func (pu *PlayerUpdate) RemoveMatches(m ...*Match) *PlayerUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (pu *PlayerUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, PlayerMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks)
|
||||
return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -615,10 +615,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -631,10 +628,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -650,10 +644,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -669,10 +660,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -685,10 +673,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -704,10 +689,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1178,7 +1160,7 @@ func (puo *PlayerUpdateOne) Select(field string, fields ...string) *PlayerUpdate
|
|||
|
||||
// Save executes the query and returns the updated Player entity.
|
||||
func (puo *PlayerUpdateOne) Save(ctx context.Context) (*Player, error) {
|
||||
return withHooks[*Player, PlayerMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks)
|
||||
return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -1351,10 +1333,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1367,10 +1346,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1386,10 +1362,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: []string{player.StatsColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1405,10 +1378,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -1421,10 +1391,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -1440,10 +1407,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
|||
Columns: player.MatchesPrimaryKey,
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Column: match.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(match.FieldID, field.TypeUint64),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/roundstats"
|
||||
|
@ -28,6 +29,7 @@ type RoundStats struct {
|
|||
// The values are being populated by the RoundStatsQuery when eager-loading is set.
|
||||
Edges RoundStatsEdges `json:"edges"`
|
||||
match_player_round_stats *int
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// RoundStatsEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -62,7 +64,7 @@ func (*RoundStats) scanValues(columns []string) ([]any, error) {
|
|||
case roundstats.ForeignKeys[0]: // match_player_round_stats
|
||||
values[i] = new(sql.NullInt64)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type RoundStats", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -113,11 +115,19 @@ func (rs *RoundStats) assignValues(columns []string, values []any) error {
|
|||
rs.match_player_round_stats = new(int)
|
||||
*rs.match_player_round_stats = int(value.Int64)
|
||||
}
|
||||
default:
|
||||
rs.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the RoundStats.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (rs *RoundStats) Value(name string) (ent.Value, error) {
|
||||
return rs.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryMatchPlayer queries the "match_player" edge of the RoundStats entity.
|
||||
func (rs *RoundStats) QueryMatchPlayer() *MatchPlayerQuery {
|
||||
return NewRoundStatsClient(rs.config).QueryMatchPlayer(rs)
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
package roundstats
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the roundstats type in the database.
|
||||
Label = "round_stats"
|
||||
|
@ -57,3 +62,45 @@ func ValidColumn(column string) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the RoundStats queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRound orders the results by the round field.
|
||||
func ByRound(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRound, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBank orders the results by the bank field.
|
||||
func ByBank(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBank, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEquipment orders the results by the equipment field.
|
||||
func ByEquipment(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEquipment, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySpent orders the results by the spent field.
|
||||
func BySpent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSpent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchPlayerField orders the results by match_player field.
|
||||
func ByMatchPlayerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchPlayerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newMatchPlayerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -247,11 +247,7 @@ func HasMatchPlayer() predicate.RoundStats {
|
|||
// HasMatchPlayerWith applies the HasEdge predicate on the "match_player" edge with a given conditions (other predicates).
|
||||
func HasMatchPlayerWith(preds ...predicate.MatchPlayer) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
step := newMatchPlayerStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -70,7 +70,7 @@ func (rsc *RoundStatsCreate) Mutation() *RoundStatsMutation {
|
|||
|
||||
// Save creates the RoundStats in the database.
|
||||
func (rsc *RoundStatsCreate) Save(ctx context.Context) (*RoundStats, error) {
|
||||
return withHooks[*RoundStats, RoundStatsMutation](ctx, rsc.sqlSave, rsc.mutation, rsc.hooks)
|
||||
return withHooks(ctx, rsc.sqlSave, rsc.mutation, rsc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -159,10 +159,7 @@ func (rsc *RoundStatsCreate) createSpec() (*RoundStats, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{roundstats.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -197,8 +194,8 @@ func (rscb *RoundStatsCreateBulk) Save(ctx context.Context) ([]*RoundStats, erro
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, rscb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (rsd *RoundStatsDelete) Where(ps ...predicate.RoundStats) *RoundStatsDelete
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (rsd *RoundStatsDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, RoundStatsMutation](ctx, rsd.sqlExec, rsd.mutation, rsd.hooks)
|
||||
return withHooks(ctx, rsd.sqlExec, rsd.mutation, rsd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
type RoundStatsQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []roundstats.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.RoundStats
|
||||
withMatchPlayer *MatchPlayerQuery
|
||||
|
@ -56,7 +56,7 @@ func (rsq *RoundStatsQuery) Unique(unique bool) *RoundStatsQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (rsq *RoundStatsQuery) Order(o ...OrderFunc) *RoundStatsQuery {
|
||||
func (rsq *RoundStatsQuery) Order(o ...roundstats.OrderOption) *RoundStatsQuery {
|
||||
rsq.order = append(rsq.order, o...)
|
||||
return rsq
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ func (rsq *RoundStatsQuery) Clone() *RoundStatsQuery {
|
|||
return &RoundStatsQuery{
|
||||
config: rsq.config,
|
||||
ctx: rsq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, rsq.order...),
|
||||
order: append([]roundstats.OrderOption{}, rsq.order...),
|
||||
inters: append([]Interceptor{}, rsq.inters...),
|
||||
predicates: append([]predicate.RoundStats{}, rsq.predicates...),
|
||||
withMatchPlayer: rsq.withMatchPlayer.Clone(),
|
||||
|
|
|
@ -113,7 +113,7 @@ func (rsu *RoundStatsUpdate) ClearMatchPlayer() *RoundStatsUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (rsu *RoundStatsUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, RoundStatsMutation](ctx, rsu.sqlSave, rsu.mutation, rsu.hooks)
|
||||
return withHooks(ctx, rsu.sqlSave, rsu.mutation, rsu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -185,10 +185,7 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{roundstats.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -201,10 +198,7 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{roundstats.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -331,7 +325,7 @@ func (rsuo *RoundStatsUpdateOne) Select(field string, fields ...string) *RoundSt
|
|||
|
||||
// Save executes the query and returns the updated RoundStats entity.
|
||||
func (rsuo *RoundStatsUpdateOne) Save(ctx context.Context) (*RoundStats, error) {
|
||||
return withHooks[*RoundStats, RoundStatsMutation](ctx, rsuo.sqlSave, rsuo.mutation, rsuo.hooks)
|
||||
return withHooks(ctx, rsuo.sqlSave, rsuo.mutation, rsuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -420,10 +414,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
|
|||
Columns: []string{roundstats.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -436,10 +427,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
|
|||
Columns: []string{roundstats.MatchPlayerColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -5,6 +5,6 @@ package runtime
|
|||
// The schema-stitching logic is generated in somegit.dev/csgowtf/csgowtfd/ent/runtime.go
|
||||
|
||||
const (
|
||||
Version = "v0.11.9" // Version of ent codegen.
|
||||
Sum = "h1:dbbCkAiPVTRBIJwoZctiSYjB7zxQIBOzVSU5H9VYIQI=" // Sum of ent codegen.
|
||||
Version = "v0.12.3" // Version of ent codegen.
|
||||
Sum = "h1:N5lO2EOrHpCH5HYfiMOCHYbo+oh5M8GjT0/cx5x6xkk=" // Sum of ent codegen.
|
||||
)
|
||||
|
|
12
ent/spray.go
12
ent/spray.go
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/spray"
|
||||
|
@ -24,6 +25,7 @@ type Spray struct {
|
|||
// The values are being populated by the SprayQuery when eager-loading is set.
|
||||
Edges SprayEdges `json:"edges"`
|
||||
match_player_spray *int
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// SprayEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -60,7 +62,7 @@ func (*Spray) scanValues(columns []string) ([]any, error) {
|
|||
case spray.ForeignKeys[0]: // match_player_spray
|
||||
values[i] = new(sql.NullInt64)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Spray", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -99,11 +101,19 @@ func (s *Spray) assignValues(columns []string, values []any) error {
|
|||
s.match_player_spray = new(int)
|
||||
*s.match_player_spray = int(value.Int64)
|
||||
}
|
||||
default:
|
||||
s.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Spray.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (s *Spray) Value(name string) (ent.Value, error) {
|
||||
return s.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryMatchPlayers queries the "match_players" edge of the Spray entity.
|
||||
func (s *Spray) QueryMatchPlayers() *MatchPlayerQuery {
|
||||
return NewSprayClient(s.config).QueryMatchPlayers(s)
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
package spray
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the spray type in the database.
|
||||
Label = "spray"
|
||||
|
@ -51,3 +56,30 @@ func ValidColumn(column string) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Spray queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWeapon orders the results by the weapon field.
|
||||
func ByWeapon(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWeapon, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchPlayersField orders the results by match_players field.
|
||||
func ByMatchPlayersField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchPlayersStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newMatchPlayersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayersTable, MatchPlayersColumn),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -157,11 +157,7 @@ func HasMatchPlayers() predicate.Spray {
|
|||
// HasMatchPlayersWith applies the HasEdge predicate on the "match_players" edge with a given conditions (other predicates).
|
||||
func HasMatchPlayersWith(preds ...predicate.MatchPlayer) predicate.Spray {
|
||||
return predicate.Spray(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayersTable, MatchPlayersColumn),
|
||||
)
|
||||
step := newMatchPlayersStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -58,7 +58,7 @@ func (sc *SprayCreate) Mutation() *SprayMutation {
|
|||
|
||||
// Save creates the Spray in the database.
|
||||
func (sc *SprayCreate) Save(ctx context.Context) (*Spray, error) {
|
||||
return withHooks[*Spray, SprayMutation](ctx, sc.sqlSave, sc.mutation, sc.hooks)
|
||||
return withHooks(ctx, sc.sqlSave, sc.mutation, sc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -133,10 +133,7 @@ func (sc *SprayCreate) createSpec() (*Spray, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{spray.MatchPlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -171,8 +168,8 @@ func (scb *SprayCreateBulk) Save(ctx context.Context) ([]*Spray, error) {
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, scb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (sd *SprayDelete) Where(ps ...predicate.Spray) *SprayDelete {
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (sd *SprayDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, SprayMutation](ctx, sd.sqlExec, sd.mutation, sd.hooks)
|
||||
return withHooks(ctx, sd.sqlExec, sd.mutation, sd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
type SprayQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []spray.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Spray
|
||||
withMatchPlayers *MatchPlayerQuery
|
||||
|
@ -56,7 +56,7 @@ func (sq *SprayQuery) Unique(unique bool) *SprayQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (sq *SprayQuery) Order(o ...OrderFunc) *SprayQuery {
|
||||
func (sq *SprayQuery) Order(o ...spray.OrderOption) *SprayQuery {
|
||||
sq.order = append(sq.order, o...)
|
||||
return sq
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ func (sq *SprayQuery) Clone() *SprayQuery {
|
|||
return &SprayQuery{
|
||||
config: sq.config,
|
||||
ctx: sq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, sq.order...),
|
||||
order: append([]spray.OrderOption{}, sq.order...),
|
||||
inters: append([]Interceptor{}, sq.inters...),
|
||||
predicates: append([]predicate.Spray{}, sq.predicates...),
|
||||
withMatchPlayers: sq.withMatchPlayers.Clone(),
|
||||
|
|
|
@ -80,7 +80,7 @@ func (su *SprayUpdate) ClearMatchPlayers() *SprayUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (su *SprayUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, SprayMutation](ctx, su.sqlSave, su.mutation, su.hooks)
|
||||
return withHooks(ctx, su.sqlSave, su.mutation, su.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -137,10 +137,7 @@ func (su *SprayUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{spray.MatchPlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -153,10 +150,7 @@ func (su *SprayUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{spray.MatchPlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -250,7 +244,7 @@ func (suo *SprayUpdateOne) Select(field string, fields ...string) *SprayUpdateOn
|
|||
|
||||
// Save executes the query and returns the updated Spray entity.
|
||||
func (suo *SprayUpdateOne) Save(ctx context.Context) (*Spray, error) {
|
||||
return withHooks[*Spray, SprayMutation](ctx, suo.sqlSave, suo.mutation, suo.hooks)
|
||||
return withHooks(ctx, suo.sqlSave, suo.mutation, suo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -324,10 +318,7 @@ func (suo *SprayUpdateOne) sqlSave(ctx context.Context) (_node *Spray, err error
|
|||
Columns: []string{spray.MatchPlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -340,10 +331,7 @@ func (suo *SprayUpdateOne) sqlSave(ctx context.Context) (_node *Spray, err error
|
|||
Columns: []string{spray.MatchPlayersColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/weapon"
|
||||
|
@ -28,6 +29,7 @@ type Weapon struct {
|
|||
// The values are being populated by the WeaponQuery when eager-loading is set.
|
||||
Edges WeaponEdges `json:"edges"`
|
||||
match_player_weapon_stats *int
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// WeaponEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -62,7 +64,7 @@ func (*Weapon) scanValues(columns []string) ([]any, error) {
|
|||
case weapon.ForeignKeys[0]: // match_player_weapon_stats
|
||||
values[i] = new(sql.NullInt64)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Weapon", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -113,11 +115,19 @@ func (w *Weapon) assignValues(columns []string, values []any) error {
|
|||
w.match_player_weapon_stats = new(int)
|
||||
*w.match_player_weapon_stats = int(value.Int64)
|
||||
}
|
||||
default:
|
||||
w.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Weapon.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (w *Weapon) Value(name string) (ent.Value, error) {
|
||||
return w.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryStat queries the "stat" edge of the Weapon entity.
|
||||
func (w *Weapon) QueryStat() *MatchPlayerQuery {
|
||||
return NewWeaponClient(w.config).QueryStat(w)
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
package weapon
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the weapon type in the database.
|
||||
Label = "weapon"
|
||||
|
@ -57,3 +62,45 @@ func ValidColumn(column string) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Weapon queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVictim orders the results by the victim field.
|
||||
func ByVictim(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVictim, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDmg orders the results by the dmg field.
|
||||
func ByDmg(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDmg, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEqType orders the results by the eq_type field.
|
||||
func ByEqType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEqType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHitGroup orders the results by the hit_group field.
|
||||
func ByHitGroup(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHitGroup, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatField orders the results by stat field.
|
||||
func ByStatField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStatStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newStatStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StatTable, StatColumn),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -247,11 +247,7 @@ func HasStat() predicate.Weapon {
|
|||
// HasStatWith applies the HasEdge predicate on the "stat" edge with a given conditions (other predicates).
|
||||
func HasStatWith(preds ...predicate.MatchPlayer) predicate.Weapon {
|
||||
return predicate.Weapon(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StatTable, StatColumn),
|
||||
)
|
||||
step := newStatStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
|
|
@ -70,7 +70,7 @@ func (wc *WeaponCreate) Mutation() *WeaponMutation {
|
|||
|
||||
// Save creates the Weapon in the database.
|
||||
func (wc *WeaponCreate) Save(ctx context.Context) (*Weapon, error) {
|
||||
return withHooks[*Weapon, WeaponMutation](ctx, wc.sqlSave, wc.mutation, wc.hooks)
|
||||
return withHooks(ctx, wc.sqlSave, wc.mutation, wc.hooks)
|
||||
}
|
||||
|
||||
// SaveX calls Save and panics if Save returns an error.
|
||||
|
@ -159,10 +159,7 @@ func (wc *WeaponCreate) createSpec() (*Weapon, *sqlgraph.CreateSpec) {
|
|||
Columns: []string{weapon.StatColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -197,8 +194,8 @@ func (wcb *WeaponCreateBulk) Save(ctx context.Context) ([]*Weapon, error) {
|
|||
return nil, err
|
||||
}
|
||||
builder.mutation = mutation
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
var err error
|
||||
nodes[i], specs[i] = builder.createSpec()
|
||||
if i < len(mutators)-1 {
|
||||
_, err = mutators[i+1].Mutate(root, wcb.builders[i+1].mutation)
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,7 @@ func (wd *WeaponDelete) Where(ps ...predicate.Weapon) *WeaponDelete {
|
|||
|
||||
// Exec executes the deletion query and returns how many vertices were deleted.
|
||||
func (wd *WeaponDelete) Exec(ctx context.Context) (int, error) {
|
||||
return withHooks[int, WeaponMutation](ctx, wd.sqlExec, wd.mutation, wd.hooks)
|
||||
return withHooks(ctx, wd.sqlExec, wd.mutation, wd.hooks)
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
type WeaponQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []weapon.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Weapon
|
||||
withStat *MatchPlayerQuery
|
||||
|
@ -56,7 +56,7 @@ func (wq *WeaponQuery) Unique(unique bool) *WeaponQuery {
|
|||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (wq *WeaponQuery) Order(o ...OrderFunc) *WeaponQuery {
|
||||
func (wq *WeaponQuery) Order(o ...weapon.OrderOption) *WeaponQuery {
|
||||
wq.order = append(wq.order, o...)
|
||||
return wq
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ func (wq *WeaponQuery) Clone() *WeaponQuery {
|
|||
return &WeaponQuery{
|
||||
config: wq.config,
|
||||
ctx: wq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, wq.order...),
|
||||
order: append([]weapon.OrderOption{}, wq.order...),
|
||||
inters: append([]Interceptor{}, wq.inters...),
|
||||
predicates: append([]predicate.Weapon{}, wq.predicates...),
|
||||
withStat: wq.withStat.Clone(),
|
||||
|
|
|
@ -113,7 +113,7 @@ func (wu *WeaponUpdate) ClearStat() *WeaponUpdate {
|
|||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (wu *WeaponUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks[int, WeaponMutation](ctx, wu.sqlSave, wu.mutation, wu.hooks)
|
||||
return withHooks(ctx, wu.sqlSave, wu.mutation, wu.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -185,10 +185,7 @@ func (wu *WeaponUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{weapon.StatColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -201,10 +198,7 @@ func (wu *WeaponUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|||
Columns: []string{weapon.StatColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
@ -331,7 +325,7 @@ func (wuo *WeaponUpdateOne) Select(field string, fields ...string) *WeaponUpdate
|
|||
|
||||
// Save executes the query and returns the updated Weapon entity.
|
||||
func (wuo *WeaponUpdateOne) Save(ctx context.Context) (*Weapon, error) {
|
||||
return withHooks[*Weapon, WeaponMutation](ctx, wuo.sqlSave, wuo.mutation, wuo.hooks)
|
||||
return withHooks(ctx, wuo.sqlSave, wuo.mutation, wuo.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
|
@ -420,10 +414,7 @@ func (wuo *WeaponUpdateOne) sqlSave(ctx context.Context) (_node *Weapon, err err
|
|||
Columns: []string{weapon.StatColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
|
@ -436,10 +427,7 @@ func (wuo *WeaponUpdateOne) sqlSave(ctx context.Context) (_node *Weapon, err err
|
|||
Columns: []string{weapon.StatColumn},
|
||||
Bidi: false,
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
IDSpec: sqlgraph.NewFieldSpec(matchplayer.FieldID, field.TypeInt),
|
||||
},
|
||||
}
|
||||
for _, k := range nodes {
|
||||
|
|
40
go.mod
40
go.mod
|
@ -3,7 +3,7 @@ module somegit.dev/csgowtf/csgowtfd
|
|||
go 1.20
|
||||
|
||||
require (
|
||||
entgo.io/ent v0.11.9
|
||||
entgo.io/ent v0.12.3
|
||||
github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794
|
||||
github.com/an0nfunc/go-steam/v3 v3.0.6
|
||||
github.com/an0nfunc/go-steamapi v1.1.0
|
||||
|
@ -11,25 +11,25 @@ require (
|
|||
github.com/gin-gonic/gin v1.9.0
|
||||
github.com/go-redis/cache/v8 v8.4.4
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551
|
||||
github.com/golang/geo v0.0.0-20230421003525-6adc56603217
|
||||
github.com/jackc/pgx/v4 v4.18.1
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.3.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/sethvargo/go-retry v0.2.4
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3
|
||||
golang.org/x/text v0.8.0
|
||||
golang.org/x/text v0.9.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
google.golang.org/protobuf v1.30.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
somegit.dev/anonfunc/gositemap v0.1.3
|
||||
)
|
||||
|
||||
require (
|
||||
ariga.io/atlas v0.9.1 // indirect
|
||||
ariga.io/atlas v0.11.0 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/bytedance/sonic v1.8.3 // indirect
|
||||
github.com/bytedance/sonic v1.8.8 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
|
||||
|
@ -39,11 +39,11 @@ require (
|
|||
github.com/go-openapi/inflect v0.19.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.2 // indirect
|
||||
github.com/goccy/go-json v0.10.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.13.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.16.1 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
|
||||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
|
||||
github.com/jackc/pgconn v1.14.0 // indirect
|
||||
github.com/jackc/pgio v1.0.0 // indirect
|
||||
|
@ -52,30 +52,30 @@ require (
|
|||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgtype v1.14.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.16.0 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||
github.com/leodido/go-urn v1.2.2 // indirect
|
||||
github.com/leodido/go-urn v1.2.4 // indirect
|
||||
github.com/markus-wa/go-unassert v0.1.3 // indirect
|
||||
github.com/markus-wa/gobitread v0.2.3 // indirect
|
||||
github.com/markus-wa/godispatch v1.4.1 // indirect
|
||||
github.com/markus-wa/ice-cipher-go v0.0.0-20220823210642-1fcccd18c6c1 // indirect
|
||||
github.com/markus-wa/quickhull-go/v2 v2.2.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/oklog/ulid/v2 v2.1.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.10 // indirect
|
||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
github.com/zclconf/go-cty v1.13.0 // indirect
|
||||
golang.org/x/arch v0.2.0 // indirect
|
||||
golang.org/x/crypto v0.6.0 // indirect
|
||||
golang.org/x/mod v0.9.0 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
github.com/zclconf/go-cty v1.13.1 // indirect
|
||||
golang.org/x/arch v0.3.0 // indirect
|
||||
golang.org/x/crypto v0.9.0 // indirect
|
||||
golang.org/x/mod v0.10.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sync v0.2.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
)
|
||||
|
|
82
go.sum
82
go.sum
|
@ -1,7 +1,7 @@
|
|||
ariga.io/atlas v0.9.1 h1:EpoPMnwsQG0vn9c0sYExpwSYtr7bvuSUXzQclU2pMjc=
|
||||
ariga.io/atlas v0.9.1/go.mod h1:T230JFcENj4ZZzMkZrXFDSkv+2kXkUgpJ5FQQ5hMcKU=
|
||||
entgo.io/ent v0.11.9 h1:dbbCkAiPVTRBIJwoZctiSYjB7zxQIBOzVSU5H9VYIQI=
|
||||
entgo.io/ent v0.11.9/go.mod h1:KWHOcDZn1xk3mz3ipWdKrQpMvwqa/9B69TUuAPP9W6g=
|
||||
ariga.io/atlas v0.11.0 h1:aGR7MzsUfmdlDYCpRErQeY2NSuRlPE0/q6drNE/5buM=
|
||||
ariga.io/atlas v0.11.0/go.mod h1:+TR129FJZ5Lvzms6dvCeGWh1yR6hMvmXBhug4hrNIGk=
|
||||
entgo.io/ent v0.12.3 h1:N5lO2EOrHpCH5HYfiMOCHYbo+oh5M8GjT0/cx5x6xkk=
|
||||
entgo.io/ent v0.12.3/go.mod h1:AigGGx+tbrBBYHAzGOg8ND661E5cxx1Uiu5o/otJ6Yg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
|
@ -17,8 +17,8 @@ github.com/an0nfunc/go-steamapi v1.1.0/go.mod h1:tInHdrGkh0gaXuPnvhMG4BoW9S5gVcW
|
|||
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.8.3 h1:pf6fGl5eqWYKkx1RcD4qpuX+BIUaduv/wTm5ekWJ80M=
|
||||
github.com/bytedance/sonic v1.8.3/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
||||
github.com/bytedance/sonic v1.8.8 h1:Kj4AYbZSeENfyXicsYppYKO0K2YWab+i2UTSY7Ukz9Q=
|
||||
github.com/bytedance/sonic v1.8.8/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
|
@ -63,8 +63,8 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl
|
|||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
|
||||
github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
|
||||
github.com/go-playground/validator/v10 v10.13.0 h1:cFRQdfaSMCOSfGCCLB20MHvuoHb/s5G8L5pu2ppK5AQ=
|
||||
github.com/go-playground/validator/v10 v10.13.0/go.mod h1:dwu7+CG8/CtBiJFZDz4e+5Upb6OLw04gtBYw0mcG/z4=
|
||||
github.com/go-redis/cache/v8 v8.4.4 h1:Rm0wZ55X22BA2JMqVtRQNHYyzDd0I5f+Ec/C9Xx3mXY=
|
||||
github.com/go-redis/cache/v8 v8.4.4/go.mod h1:JM6CkupsPvAu/LYEVGQy6UB4WDAzQSXkR0lUCbeIcKc=
|
||||
github.com/go-redis/redis/v8 v8.11.3/go.mod h1:xNJ9xDG09FsIPwh3bWdk+0oDWHbtF9rPN0F/oD9XeKc=
|
||||
|
@ -74,13 +74,13 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
|
|||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
|
||||
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA=
|
||||
github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/golang/geo v0.0.0-20180826223333-635502111454/go.mod h1:vgWZ7cu0fq0KY3PpEHsocXOWJpRtkcbKemU4IUw0M60=
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFiguSNcXmS6rkKT+X7FdIrTtfo=
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 h1:HKlyj6in2JV6wVkmQ4XmG/EIm+SCYlPZ+V4GWit7Z+I=
|
||||
github.com/golang/geo v0.0.0-20230421003525-6adc56603217/go.mod h1:8wI0hitZ3a1IxZfeH3/5I97CI8i5cLGsYe7xNhQGs9U=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
|
@ -101,8 +101,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
|
|||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/hashicorp/hcl/v2 v2.16.1 h1:BwuxEMD/tsYgbhIW7UuI3crjovf3MzuFWiVgiv57iHg=
|
||||
github.com/hashicorp/hcl/v2 v2.16.1/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng=
|
||||
github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0=
|
||||
github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
||||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
||||
|
@ -156,8 +156,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
|
|||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4=
|
||||
github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||
github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
|
||||
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
||||
|
@ -174,13 +174,13 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/leodido/go-urn v1.2.2 h1:7z68G0FCGvDk646jz1AelTYNYWrTNm0bEcFAo147wt4=
|
||||
github.com/leodido/go-urn v1.2.2/go.mod h1:kUaIbLZWttglzwNuG0pgsh5vuV6u2YcGBYz1hIPjtOQ=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.3.0 h1:cXAI081cH5tDmmyPuyUzuIGeP8strtVzdtRB5VlIvL8=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.3.0/go.mod h1:NzAkCtDshPkoSMg3hAyojkmHE4ZgnNWCM1Vv4yCPLsI=
|
||||
github.com/markus-wa/go-unassert v0.1.3 h1:4N2fPLUS3929Rmkv94jbWskjsLiyNT2yQpCulTFFWfM=
|
||||
|
@ -199,8 +199,8 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
|||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
|
||||
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
|
||||
|
@ -239,7 +239,6 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po
|
|||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/rwtodd/Go.Sed v0.0.0-20210816025313-55464686f9ef/go.mod h1:8AEUvGVi2uQ5b24BIhcr0GCcpd/RNAFWaN2CJFrWIIQ=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=
|
||||
|
@ -272,8 +271,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
|||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||
github.com/ugorji/go/codec v1.2.10 h1:eimT6Lsr+2lzmSZxPhLFoOWFmQqwk0fllJJ5hEbTXtQ=
|
||||
github.com/ugorji/go/codec v1.2.10/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI=
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q=
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
|
||||
|
@ -285,8 +284,8 @@ github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3 h1:shC1HB1Uogx
|
|||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3/go.mod h1:XCsSkdKK4gwBMNrOCZWww0pX6AOt+2gYc5Z6jBRrNVg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/zclconf/go-cty v1.13.0 h1:It5dfKTTZHe9aeppbNOda3mN7Ag7sg6QkBNm6TkyFa0=
|
||||
github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
|
||||
github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc=
|
||||
github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
|
@ -300,8 +299,8 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
|||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.2.0 h1:W1sUEHXiJTfjaFJ5SLo0N6lZn+0eO5gWD1MFeTGqQEY=
|
||||
golang.org/x/arch v0.2.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
|
||||
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
@ -312,15 +311,16 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP
|
|||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
|
||||
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
|
||||
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
|
@ -332,15 +332,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
|||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
|
||||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
@ -367,10 +367,10 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
|
@ -382,8 +382,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
@ -413,8 +413,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
|||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
Loading…
Reference in New Issue