MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / CountX

Method CountX

ent/node_query.go:235–241  ·  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

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

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected