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

Function querierCount

app/controlplane/pkg/data/ent/ent.go:584–594  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

582}
583
584func querierCount[Q interface {
585 sqlCount(context.Context) (int, error)
586}]() Querier {
587 return QuerierFunc(func(ctx context.Context, q Query) (Value, error) {
588 query, ok := q.(Q)
589 if !ok {
590 return nil, fmt.Errorf("unexpected query type %T", q)
591 }
592 return query.sqlCount(ctx)
593 })
594}
595
596func withInterceptors[V Value](ctx context.Context, q Query, qr Querier, inters []Interceptor) (v V, err error) {
597 for i := len(inters) - 1; i >= 0; i-- {

Callers

nothing calls this directly

Calls 1

sqlCountMethod · 0.45

Tested by

no test coverage detected