MCPcopy Create free account
hub / github.com/efectn/go-orm-benchmarks / querierAll

Function querierAll

bench/ent/ent.go:534–544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

532}
533
534func querierAll[V Value, Q interface {
535 sqlAll(context.Context, ...queryHook) (V, error)
536}]() Querier {
537 return QuerierFunc(func(ctx context.Context, q Query) (Value, error) {
538 query, ok := q.(Q)
539 if !ok {
540 return nil, fmt.Errorf("unexpected query type %T", q)
541 }
542 return query.sqlAll(ctx)
543 })
544}
545
546func querierCount[Q interface {
547 sqlCount(context.Context) (int, error)

Callers 1

AllMethod · 0.85

Calls 1

sqlAllMethod · 0.80

Tested by

no test coverage detected