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

Method Count

ent/metadata_query.go:225–231  ·  view source on GitHub ↗

Count returns the count of the given query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

223
224// Count returns the count of the given query.
225func (mq *MetadataQuery) Count(ctx context.Context) (int, error) {
226 ctx = setContextOp(ctx, mq.ctx, "Count")
227 if err := mq.prepareQuery(ctx); err != nil {
228 return 0, err
229 }
230 return withInterceptors[int](ctx, mq, querierCount[*MetadataQuery](), mq.inters)
231}
232
233// CountX is like Count, but panics if an error occurs.
234func (mq *MetadataQuery) CountX(ctx context.Context) int {

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected