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

Method Select

ent/node_query.go:406–412  ·  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.Node.Query(). Select(node.FieldCreateTime). Scan(ctx, &v)

(fields ...string)

Source from the content-addressed store, hash-verified

404// Select(node.FieldCreateTime).
405// Scan(ctx, &v)
406func (nq *NodeQuery) Select(fields ...string) *NodeSelect {
407 nq.ctx.Fields = append(nq.ctx.Fields, fields...)
408 sbuild := &NodeSelect{NodeQuery: nq}
409 sbuild.label = node.Label
410 sbuild.flds, sbuild.scan = &nq.ctx.Fields, sbuild.Scan
411 return sbuild
412}
413
414// Aggregate returns a NodeSelect configured with the given aggregations.
415func (nq *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect {

Callers 7

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

Calls

no outgoing calls

Tested by

no test coverage detected