MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / GroupBy

Method GroupBy

ent/nodeversion_query.go:387–394  ·  view source on GitHub ↗

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum. Example: var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.NodeVersion.Query(). Gro

(field string, fields ...string)

Source from the content-addressed store, hash-verified

385// Aggregate(ent.Count()).
386// Scan(ctx, &v)
387func (nvq *NodeVersionQuery) GroupBy(field string, fields ...string) *NodeVersionGroupBy {
388 nvq.ctx.Fields = append([]string{field}, fields...)
389 grbuild := &NodeVersionGroupBy{build: nvq}
390 grbuild.flds = &nvq.ctx.Fields
391 grbuild.label = nodeversion.Label
392 grbuild.scan = grbuild.Scan
393 return grbuild
394}
395
396// Select allows the selection one or more fields/columns for the given query,
397// instead of selecting all fields in the entity.

Callers 1

sqlScanMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected