MCPcopy Create free account
hub / github.com/crowdsecurity/crowdsec / CountX

Method CountX

pkg/database/ent/machine_query.go:236–242  ·  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

234
235// CountX is like Count, but panics if an error occurs.
236func (_q *MachineQuery) CountX(ctx context.Context) int {
237 count, err := _q.Count(ctx)
238 if err != nil {
239 panic(err)
240 }
241 return count
242}
243
244// Exist returns true if the query has elements in the graph.
245func (_q *MachineQuery) Exist(ctx context.Context) (bool, error) {

Callers

nothing calls this directly

Calls 1

CountMethod · 0.95

Tested by

no test coverage detected