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

Method Count

ent/storagepolicy_query.go:298–304  ·  view source on GitHub ↗

Count returns the count of the given query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

296
297// Count returns the count of the given query.
298func (spq *StoragePolicyQuery) Count(ctx context.Context) (int, error) {
299 ctx = setContextOp(ctx, spq.ctx, "Count")
300 if err := spq.prepareQuery(ctx); err != nil {
301 return 0, err
302 }
303 return withInterceptors[int](ctx, spq, querierCount[*StoragePolicyQuery](), spq.inters)
304}
305
306// CountX is like Count, but panics if an error occurs.
307func (spq *StoragePolicyQuery) CountX(ctx context.Context) int {

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected