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