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