Count returns the count of the given query.
(ctx context.Context)
| 224 | |
| 225 | // Count returns the count of the given query. |
| 226 | func (_q *MetaQuery) Count(ctx context.Context) (int, error) { |
| 227 | ctx = setContextOp(ctx, _q.ctx, ent.OpQueryCount) |
| 228 | if err := _q.prepareQuery(ctx); err != nil { |
| 229 | return 0, err |
| 230 | } |
| 231 | return withInterceptors[int](ctx, _q, querierCount[*MetaQuery](), _q.inters) |
| 232 | } |
| 233 | |
| 234 | // CountX is like Count, but panics if an error occurs. |
| 235 | func (_q *MetaQuery) CountX(ctx context.Context) int { |
no test coverage detected