MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Select

Method Select

app/controlplane/pkg/data/ent/group_query.go:371–377  ·  view source on GitHub ↗

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity. Example: var v []struct { Name string `json:"name,omitempty"` } client.Group.Query(). Select(group.FieldName). Scan(ctx, &v)

(fields ...string)

Source from the content-addressed store, hash-verified

369// Select(group.FieldName).
370// Scan(ctx, &v)
371func (_q *GroupQuery) Select(fields ...string) *GroupSelect {
372 _q.ctx.Fields = append(_q.ctx.Fields, fields...)
373 sbuild := &GroupSelect{GroupQuery: _q}
374 sbuild.label = group.Label
375 sbuild.flds, sbuild.scan = &_q.ctx.Fields, sbuild.Scan
376 return sbuild
377}
378
379// Aggregate returns a GroupSelect configured with the given aggregations.
380func (_q *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect {

Callers 6

IDsMethod · 0.95
AggregateMethod · 0.95
ModifyMethod · 0.95
sqlQueryMethod · 0.45
sqlScanMethod · 0.45
sqlScanMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected