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