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

Method CountX

ent/metadata_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 (mq *MetadataQuery) CountX(ctx context.Context) int {
235 count, err := mq.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 (mq *MetadataQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected