CountX is like Count, but panics if an error occurs.
(ctx context.Context)
| 281 | |
| 282 | // CountX is like Count, but panics if an error occurs. |
| 283 | func (eq *EntityQuery) CountX(ctx context.Context) int { |
| 284 | count, err := eq.Count(ctx) |
| 285 | if err != nil { |
| 286 | panic(err) |
| 287 | } |
| 288 | return count |
| 289 | } |
| 290 | |
| 291 | // Exist returns true if the query has elements in the graph. |
| 292 | func (eq *EntityQuery) Exist(ctx context.Context) (bool, error) { |