Count returns the count of the given query.
(ctx context.Context)
| 252 | |
| 253 | // Count returns the count of the given query. |
| 254 | func (_q *UserQuery) Count(ctx context.Context) (int, error) { |
| 255 | ctx = setContextOp(ctx, _q.ctx, ent.OpQueryCount) |
| 256 | if err := _q.prepareQuery(ctx); err != nil { |
| 257 | return 0, err |
| 258 | } |
| 259 | return withInterceptors[int](ctx, _q, querierCount[*UserQuery](), _q.inters) |
| 260 | } |
| 261 | |
| 262 | // CountX is like Count, but panics if an error occurs. |
| 263 | func (_q *UserQuery) CountX(ctx context.Context) int { |
no test coverage detected