updated deps & regen ent
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user