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

Method Count

ent/setting_query.go:201–207  ·  view source on GitHub ↗

Count returns the count of the given query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

199
200// Count returns the count of the given query.
201func (sq *SettingQuery) Count(ctx context.Context) (int, error) {
202 ctx = setContextOp(ctx, sq.ctx, "Count")
203 if err := sq.prepareQuery(ctx); err != nil {
204 return 0, err
205 }
206 return withInterceptors[int](ctx, sq, querierCount[*SettingQuery](), sq.inters)
207}
208
209// CountX is like Count, but panics if an error occurs.
210func (sq *SettingQuery) CountX(ctx context.Context) int {

Callers 1

CountXMethod · 0.95

Calls 2

prepareQueryMethod · 0.95
setContextOpFunction · 0.85

Tested by

no test coverage detected