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

Method Count

ent/group_query.go:250–256  ·  view source on GitHub ↗

Count returns the count of the given query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

248
249// Count returns the count of the given query.
250func (gq *GroupQuery) Count(ctx context.Context) (int, error) {
251 ctx = setContextOp(ctx, gq.ctx, "Count")
252 if err := gq.prepareQuery(ctx); err != nil {
253 return 0, err
254 }
255 return withInterceptors[int](ctx, gq, querierCount[*GroupQuery](), gq.inters)
256}
257
258// CountX is like Count, but panics if an error occurs.
259func (gq *GroupQuery) CountX(ctx context.Context) int {

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected