updated deps; regen ent

This commit is contained in:
2022-08-15 12:10:15 +02:00
parent b8b9f82067
commit 657ca32bb3
66 changed files with 1578 additions and 4744 deletions

View File

@@ -1,9 +1,10 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package ent
import (
"context"
"errors"
"fmt"
"log"
@@ -83,7 +84,7 @@ func Open(driverName, dataSourceName string, options ...Option) (*Client, error)
// is used until the transaction is committed or rolled back.
func (c *Client) Tx(ctx context.Context) (*Tx, error) {
if _, ok := c.driver.(*txDriver); ok {
return nil, fmt.Errorf("ent: cannot start a transaction within a transaction")
return nil, errors.New("ent: cannot start a transaction within a transaction")
}
tx, err := newTx(ctx, c.driver)
if err != nil {
@@ -107,7 +108,7 @@ func (c *Client) Tx(ctx context.Context) (*Tx, error) {
// BeginTx returns a transactional client with specified options.
func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) {
if _, ok := c.driver.(*txDriver); ok {
return nil, fmt.Errorf("ent: cannot start a transaction within a transaction")
return nil, errors.New("ent: cannot start a transaction within a transaction")
}
tx, err := c.driver.(interface {
BeginTx(context.Context, *sql.TxOptions) (dialect.Tx, error)
@@ -136,7 +137,6 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
// Match.
// Query().
// Count(ctx)
//
func (c *Client) Debug() *Client {
if c.debug {
return c
@@ -181,7 +181,7 @@ func (c *MatchClient) Use(hooks ...Hook) {
c.hooks.Match = append(c.hooks.Match, hooks...)
}
// Create returns a create builder for Match.
// Create returns a builder for creating a Match entity.
func (c *MatchClient) Create() *MatchCreate {
mutation := newMatchMutation(c.config, OpCreate)
return &MatchCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -216,12 +216,12 @@ func (c *MatchClient) Delete() *MatchDelete {
return &MatchDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *MatchClient) DeleteOne(m *Match) *MatchDeleteOne {
return c.DeleteOneID(m.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *MatchClient) DeleteOneID(id uint64) *MatchDeleteOne {
builder := c.Delete().Where(match.ID(id))
builder.mutation.id = &id
@@ -303,7 +303,7 @@ func (c *MatchPlayerClient) Use(hooks ...Hook) {
c.hooks.MatchPlayer = append(c.hooks.MatchPlayer, hooks...)
}
// Create returns a create builder for MatchPlayer.
// Create returns a builder for creating a MatchPlayer entity.
func (c *MatchPlayerClient) Create() *MatchPlayerCreate {
mutation := newMatchPlayerMutation(c.config, OpCreate)
return &MatchPlayerCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -338,12 +338,12 @@ func (c *MatchPlayerClient) Delete() *MatchPlayerDelete {
return &MatchPlayerDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *MatchPlayerClient) DeleteOne(mp *MatchPlayer) *MatchPlayerDeleteOne {
return c.DeleteOneID(mp.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *MatchPlayerClient) DeleteOneID(id int) *MatchPlayerDeleteOne {
builder := c.Delete().Where(matchplayer.ID(id))
builder.mutation.id = &id
@@ -489,7 +489,7 @@ func (c *MessagesClient) Use(hooks ...Hook) {
c.hooks.Messages = append(c.hooks.Messages, hooks...)
}
// Create returns a create builder for Messages.
// Create returns a builder for creating a Messages entity.
func (c *MessagesClient) Create() *MessagesCreate {
mutation := newMessagesMutation(c.config, OpCreate)
return &MessagesCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -524,12 +524,12 @@ func (c *MessagesClient) Delete() *MessagesDelete {
return &MessagesDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *MessagesClient) DeleteOne(m *Messages) *MessagesDeleteOne {
return c.DeleteOneID(m.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *MessagesClient) DeleteOneID(id int) *MessagesDeleteOne {
builder := c.Delete().Where(messages.ID(id))
builder.mutation.id = &id
@@ -595,7 +595,7 @@ func (c *PlayerClient) Use(hooks ...Hook) {
c.hooks.Player = append(c.hooks.Player, hooks...)
}
// Create returns a create builder for Player.
// Create returns a builder for creating a Player entity.
func (c *PlayerClient) Create() *PlayerCreate {
mutation := newPlayerMutation(c.config, OpCreate)
return &PlayerCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -630,12 +630,12 @@ func (c *PlayerClient) Delete() *PlayerDelete {
return &PlayerDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne {
return c.DeleteOneID(pl.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *PlayerClient) DeleteOneID(id uint64) *PlayerDeleteOne {
builder := c.Delete().Where(player.ID(id))
builder.mutation.id = &id
@@ -717,7 +717,7 @@ func (c *RoundStatsClient) Use(hooks ...Hook) {
c.hooks.RoundStats = append(c.hooks.RoundStats, hooks...)
}
// Create returns a create builder for RoundStats.
// Create returns a builder for creating a RoundStats entity.
func (c *RoundStatsClient) Create() *RoundStatsCreate {
mutation := newRoundStatsMutation(c.config, OpCreate)
return &RoundStatsCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -752,12 +752,12 @@ func (c *RoundStatsClient) Delete() *RoundStatsDelete {
return &RoundStatsDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *RoundStatsClient) DeleteOne(rs *RoundStats) *RoundStatsDeleteOne {
return c.DeleteOneID(rs.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *RoundStatsClient) DeleteOneID(id int) *RoundStatsDeleteOne {
builder := c.Delete().Where(roundstats.ID(id))
builder.mutation.id = &id
@@ -823,7 +823,7 @@ func (c *SprayClient) Use(hooks ...Hook) {
c.hooks.Spray = append(c.hooks.Spray, hooks...)
}
// Create returns a create builder for Spray.
// Create returns a builder for creating a Spray entity.
func (c *SprayClient) Create() *SprayCreate {
mutation := newSprayMutation(c.config, OpCreate)
return &SprayCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -858,12 +858,12 @@ func (c *SprayClient) Delete() *SprayDelete {
return &SprayDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *SprayClient) DeleteOne(s *Spray) *SprayDeleteOne {
return c.DeleteOneID(s.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *SprayClient) DeleteOneID(id int) *SprayDeleteOne {
builder := c.Delete().Where(spray.ID(id))
builder.mutation.id = &id
@@ -929,7 +929,7 @@ func (c *WeaponClient) Use(hooks ...Hook) {
c.hooks.Weapon = append(c.hooks.Weapon, hooks...)
}
// Create returns a create builder for Weapon.
// Create returns a builder for creating a Weapon entity.
func (c *WeaponClient) Create() *WeaponCreate {
mutation := newWeaponMutation(c.config, OpCreate)
return &WeaponCreate{config: c.config, hooks: c.Hooks(), mutation: mutation}
@@ -964,12 +964,12 @@ func (c *WeaponClient) Delete() *WeaponDelete {
return &WeaponDelete{config: c.config, hooks: c.Hooks(), mutation: mutation}
}
// DeleteOne returns a delete builder for the given entity.
// DeleteOne returns a builder for deleting the given entity.
func (c *WeaponClient) DeleteOne(w *Weapon) *WeaponDeleteOne {
return c.DeleteOneID(w.ID)
}
// DeleteOneID returns a delete builder for the given id.
// DeleteOne returns a builder for deleting the given entity by its id.
func (c *WeaponClient) DeleteOneID(id int) *WeaponDeleteOne {
builder := c.Delete().Where(weapon.ID(id))
builder.mutation.id = &id