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

Method Select

ent/gitcommit_query.go:335–341  ·  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 { CreateTime time.Time `json:"create_time,omitempty"` } client.GitCommit.Query(). Select(gitcommit.FieldCreateTime). Scan(ctx, &v)

(fields ...string)

Source from the content-addressed store, hash-verified

333// Select(gitcommit.FieldCreateTime).
334// Scan(ctx, &v)
335func (gcq *GitCommitQuery) Select(fields ...string) *GitCommitSelect {
336 gcq.ctx.Fields = append(gcq.ctx.Fields, fields...)
337 sbuild := &GitCommitSelect{GitCommitQuery: gcq}
338 sbuild.label = gitcommit.Label
339 sbuild.flds, sbuild.scan = &gcq.ctx.Fields, sbuild.Scan
340 return sbuild
341}
342
343// Aggregate returns a GitCommitSelect configured with the given aggregations.
344func (gcq *GitCommitQuery) Aggregate(fns ...AggregateFunc) *GitCommitSelect {

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