added chat messages
This commit is contained in:
@@ -513,6 +513,10 @@ func (pq *PlayerQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
if len(pq.modifiers) > 0 {
|
||||
_spec.Modifiers = pq.modifiers
|
||||
}
|
||||
_spec.Node.Columns = pq.fields
|
||||
if len(pq.fields) > 0 {
|
||||
_spec.Unique = pq.unique != nil && *pq.unique
|
||||
}
|
||||
return sqlgraph.CountNodes(ctx, pq.driver, _spec)
|
||||
}
|
||||
|
||||
@@ -584,6 +588,9 @@ func (pq *PlayerQuery) sqlQuery(ctx context.Context) *sql.Selector {
|
||||
selector = pq.sql
|
||||
selector.Select(selector.Columns(columns...)...)
|
||||
}
|
||||
if pq.unique != nil && *pq.unique {
|
||||
selector.Distinct()
|
||||
}
|
||||
for _, m := range pq.modifiers {
|
||||
m(selector)
|
||||
}
|
||||
@@ -871,9 +878,7 @@ func (pgb *PlayerGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, f := range pgb.fields {
|
||||
columns = append(columns, selector.C(f))
|
||||
}
|
||||
for _, c := range aggregation {
|
||||
columns = append(columns, c)
|
||||
}
|
||||
columns = append(columns, aggregation...)
|
||||
selector.Select(columns...)
|
||||
}
|
||||
return selector.GroupBy(selector.Columns(pgb.fields...)...)
|
||||
|
Reference in New Issue
Block a user