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

Method Count

ent/task_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 (tq *TaskQuery) Count(ctx context.Context) (int, error) {
226 ctx = setContextOp(ctx, tq.ctx, "Count")
227 if err := tq.prepareQuery(ctx); err != nil {
228 return 0, err
229 }
230 return withInterceptors[int](ctx, tq, querierCount[*TaskQuery](), tq.inters)
231}
232
233// CountX is like Count, but panics if an error occurs.
234func (tq *TaskQuery) CountX(ctx context.Context) int {

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected