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

Method CountX

ent/task_query.go:234–240  ·  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

232
233// CountX is like Count, but panics if an error occurs.
234func (tq *TaskQuery) CountX(ctx context.Context) int {
235 count, err := tq.Count(ctx)
236 if err != nil {
237 panic(err)
238 }
239 return count
240}
241
242// Exist returns true if the query has elements in the graph.
243func (tq *TaskQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected