fixed match win/loss/ties
This commit is contained in:
@@ -176,7 +176,7 @@ func (c *MatchClient) UpdateOne(m *Match) *MatchUpdateOne {
|
||||
}
|
||||
|
||||
// UpdateOneID returns an update builder for the given id.
|
||||
func (c *MatchClient) UpdateOneID(id int) *MatchUpdateOne {
|
||||
func (c *MatchClient) UpdateOneID(id uint64) *MatchUpdateOne {
|
||||
mutation := newMatchMutation(c.config, OpUpdateOne, withMatchID(id))
|
||||
return &MatchUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ func (c *MatchClient) DeleteOne(m *Match) *MatchDeleteOne {
|
||||
}
|
||||
|
||||
// DeleteOneID returns a delete builder for the given id.
|
||||
func (c *MatchClient) DeleteOneID(id int) *MatchDeleteOne {
|
||||
func (c *MatchClient) DeleteOneID(id uint64) *MatchDeleteOne {
|
||||
builder := c.Delete().Where(match.ID(id))
|
||||
builder.mutation.id = &id
|
||||
builder.mutation.op = OpDeleteOne
|
||||
@@ -208,12 +208,12 @@ func (c *MatchClient) Query() *MatchQuery {
|
||||
}
|
||||
|
||||
// Get returns a Match entity by its id.
|
||||
func (c *MatchClient) Get(ctx context.Context, id int) (*Match, error) {
|
||||
func (c *MatchClient) Get(ctx context.Context, id uint64) (*Match, error) {
|
||||
return c.Query().Where(match.ID(id)).Only(ctx)
|
||||
}
|
||||
|
||||
// GetX is like Get, but panics if an error occurs.
|
||||
func (c *MatchClient) GetX(ctx context.Context, id int) *Match {
|
||||
func (c *MatchClient) GetX(ctx context.Context, id uint64) *Match {
|
||||
obj, err := c.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -298,7 +298,7 @@ func (c *PlayerClient) UpdateOne(pl *Player) *PlayerUpdateOne {
|
||||
}
|
||||
|
||||
// UpdateOneID returns an update builder for the given id.
|
||||
func (c *PlayerClient) UpdateOneID(id int) *PlayerUpdateOne {
|
||||
func (c *PlayerClient) UpdateOneID(id uint64) *PlayerUpdateOne {
|
||||
mutation := newPlayerMutation(c.config, OpUpdateOne, withPlayerID(id))
|
||||
return &PlayerUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation}
|
||||
}
|
||||
@@ -315,7 +315,7 @@ func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne {
|
||||
}
|
||||
|
||||
// DeleteOneID returns a delete builder for the given id.
|
||||
func (c *PlayerClient) DeleteOneID(id int) *PlayerDeleteOne {
|
||||
func (c *PlayerClient) DeleteOneID(id uint64) *PlayerDeleteOne {
|
||||
builder := c.Delete().Where(player.ID(id))
|
||||
builder.mutation.id = &id
|
||||
builder.mutation.op = OpDeleteOne
|
||||
@@ -330,12 +330,12 @@ func (c *PlayerClient) Query() *PlayerQuery {
|
||||
}
|
||||
|
||||
// Get returns a Player entity by its id.
|
||||
func (c *PlayerClient) Get(ctx context.Context, id int) (*Player, error) {
|
||||
func (c *PlayerClient) Get(ctx context.Context, id uint64) (*Player, error) {
|
||||
return c.Query().Where(player.ID(id)).Only(ctx)
|
||||
}
|
||||
|
||||
// GetX is like Get, but panics if an error occurs.
|
||||
func (c *PlayerClient) GetX(ctx context.Context, id int) *Player {
|
||||
func (c *PlayerClient) GetX(ctx context.Context, id uint64) *Player {
|
||||
obj, err := c.Get(ctx, id)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Reference in New Issue
Block a user