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

Method sqlCount

app/controlplane/pkg/data/ent/group_query.go:516–526  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

514}
515
516func (_q *GroupQuery) sqlCount(ctx context.Context) (int, error) {
517 _spec := _q.querySpec()
518 if len(_q.modifiers) > 0 {
519 _spec.Modifiers = _q.modifiers
520 }
521 _spec.Node.Columns = _q.ctx.Fields
522 if len(_q.ctx.Fields) > 0 {
523 _spec.Unique = _q.ctx.Unique != nil && *_q.ctx.Unique
524 }
525 return sqlgraph.CountNodes(ctx, _q.driver, _spec)
526}
527
528func (_q *GroupQuery) querySpec() *sqlgraph.QuerySpec {
529 _spec := sqlgraph.NewQuerySpec(group.Table, group.Columns, sqlgraph.NewFieldSpec(group.FieldID, field.TypeUUID))

Callers

nothing calls this directly

Calls 1

querySpecMethod · 0.95

Tested by

no test coverage detected