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

Method CountX

ent/group_query.go:259–265  ·  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

257
258// CountX is like Count, but panics if an error occurs.
259func (gq *GroupQuery) CountX(ctx context.Context) int {
260 count, err := gq.Count(ctx)
261 if err != nil {
262 panic(err)
263 }
264 return count
265}
266
267// Exist returns true if the query has elements in the graph.
268func (gq *GroupQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected