CountX is like Count, but panics if an error occurs.
(ctx context.Context)
| 234 | |
| 235 | // CountX is like Count, but panics if an error occurs. |
| 236 | func (_q *MachineQuery) CountX(ctx context.Context) int { |
| 237 | count, err := _q.Count(ctx) |
| 238 | if err != nil { |
| 239 | panic(err) |
| 240 | } |
| 241 | return count |
| 242 | } |
| 243 | |
| 244 | // Exist returns true if the query has elements in the graph. |
| 245 | func (_q *MachineQuery) Exist(ctx context.Context) (bool, error) { |