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

Method CountX

bench/ent/model_query.go:210–216  ·  view source on GitHub ↗

CountX is like Count, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

208
209// CountX is like Count, but panics if an error occurs.
210func (mq *ModelQuery) CountX(ctx context.Context) int {
211 count, err := mq.Count(ctx)
212 if err != nil {
213 panic(err)
214 }
215 return count
216}
217
218// Exist returns true if the query has elements in the graph.
219func (mq *ModelQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected