CountX is like Count, but panics if an error occurs.
(ctx context.Context)
| 425 | |
| 426 | // CountX is like Count, but panics if an error occurs. |
| 427 | func (uq *UserQuery) CountX(ctx context.Context) int { |
| 428 | count, err := uq.Count(ctx) |
| 429 | if err != nil { |
| 430 | panic(err) |
| 431 | } |
| 432 | return count |
| 433 | } |
| 434 | |
| 435 | // Exist returns true if the query has elements in the graph. |
| 436 | func (uq *UserQuery) Exist(ctx context.Context) (bool, error) { |