MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / CountX

Method CountX

ent/entity_query.go:283–289  ·  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

281
282// CountX is like Count, but panics if an error occurs.
283func (eq *EntityQuery) CountX(ctx context.Context) int {
284 count, err := eq.Count(ctx)
285 if err != nil {
286 panic(err)
287 }
288 return count
289}
290
291// Exist returns true if the query has elements in the graph.
292func (eq *EntityQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected