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

Method CountX

ent/share_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 (sq *ShareQuery) CountX(ctx context.Context) int {
260 count, err := sq.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 (sq *ShareQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected