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

Method CountX

ent/setting_query.go:210–216  ·  view source on GitHub ↗

CountX is like Count, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

208
209// CountX is like Count, but panics if an error occurs.
210func (sq *SettingQuery) CountX(ctx context.Context) int {
211 count, err := sq.Count(ctx)
212 if err != nil {
213 panic(err)
214 }
215 return count
216}
217
218// Exist returns true if the query has elements in the graph.
219func (sq *SettingQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected