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

Method All

pkg/database/ent/alert_query.go:260–267  ·  view source on GitHub ↗

All executes the query and returns a list of Alerts.

(ctx context.Context)

Source from the content-addressed store, hash-verified

258
259// All executes the query and returns a list of Alerts.
260func (_q *AlertQuery) All(ctx context.Context) ([]*Alert, error) {
261 ctx = setContextOp(ctx, _q.ctx, ent.OpQueryAll)
262 if err := _q.prepareQuery(ctx); err != nil {
263 return nil, err
264 }
265 qr := querierAll[[]*Alert, *AlertQuery]()
266 return withInterceptors[[]*Alert](ctx, _q, qr, _q.inters)
267}
268
269// AllX is like All, but panics if an error occurs.
270func (_q *AlertQuery) AllX(ctx context.Context) []*Alert {

Callers 7

AllXMethod · 0.95
FirstMethod · 0.45
OnlyMethod · 0.45
loadOwnerMethod · 0.45
loadDecisionsMethod · 0.45
loadEventsMethod · 0.45
loadMetasMethod · 0.45

Calls 4

prepareQueryMethod · 0.95
setContextOpFunction · 0.85
querierAllFunction · 0.85
withInterceptorsFunction · 0.85

Tested by

no test coverage detected