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

Method CountX

ent/user_query.go:427–433  ·  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

425
426// CountX is like Count, but panics if an error occurs.
427func (uq *UserQuery) CountX(ctx context.Context) int {
428 count, err := uq.Count(ctx)
429 if err != nil {
430 panic(err)
431 }
432 return count
433}
434
435// Exist returns true if the query has elements in the graph.
436func (uq *UserQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected