CountX is like Count, but panics if an error occurs.
(ctx context.Context)
| 261 | |
| 262 | // CountX is like Count, but panics if an error occurs. |
| 263 | func (_q *UserQuery) CountX(ctx context.Context) int { |
| 264 | count, err := _q.Count(ctx) |
| 265 | if err != nil { |
| 266 | panic(err) |
| 267 | } |
| 268 | return count |
| 269 | } |
| 270 | |
| 271 | // Exist returns true if the query has elements in the graph. |
| 272 | func (_q *UserQuery) Exist(ctx context.Context) (bool, error) { |