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

Method Count

ent/node_query.go:226–232  ·  view source on GitHub ↗

Count returns the count of the given query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

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

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected