MCPcopy
hub / github.com/crowdsecurity/crowdsec / WithEvents

Method WithEvents

pkg/database/ent/alert_query.go:385–392  ·  view source on GitHub ↗

WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.

(opts ...func(*EventQuery))

Source from the content-addressed store, hash-verified

383// WithEvents tells the query-builder to eager-load the nodes that are connected to
384// the "events" edge. The optional arguments are used to configure the query builder of the edge.
385func (_q *AlertQuery) WithEvents(opts ...func(*EventQuery)) *AlertQuery {
386 query := (&EventClient{config: _q.config}).Query()
387 for _, opt := range opts {
388 opt(query)
389 }
390 _q.withEvents = query
391 return _q
392}
393
394// WithMetas tells the query-builder to eager-load the nodes that are connected to
395// the "metas" edge. The optional arguments are used to configure the query builder of the edge.

Callers 2

QueryAlertWithFilterMethod · 0.80
GetAlertByIDMethod · 0.80

Calls 1

QueryMethod · 0.45

Tested by

no test coverage detected