Count returns the count of the given query.
(ctx context.Context)
| 298 | |
| 299 | // Count returns the count of the given query. |
| 300 | func (_q *AlertQuery) Count(ctx context.Context) (int, error) { |
| 301 | ctx = setContextOp(ctx, _q.ctx, ent.OpQueryCount) |
| 302 | if err := _q.prepareQuery(ctx); err != nil { |
| 303 | return 0, err |
| 304 | } |
| 305 | return withInterceptors[int](ctx, _q, querierCount[*AlertQuery](), _q.inters) |
| 306 | } |
| 307 | |
| 308 | // CountX is like Count, but panics if an error occurs. |
| 309 | func (_q *AlertQuery) CountX(ctx context.Context) int { |
no test coverage detected