updated deps & regen ent

This commit is contained in:
2023-05-16 18:09:10 +02:00
parent e9e3e02a39
commit 3fd0a4204b
53 changed files with 1062 additions and 593 deletions

View File

@@ -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)