CountX is like Count, but panics if an error occurs.
(ctx context.Context)
| 208 | |
| 209 | // CountX is like Count, but panics if an error occurs. |
| 210 | func (sq *SettingQuery) CountX(ctx context.Context) int { |
| 211 | count, err := sq.Count(ctx) |
| 212 | if err != nil { |
| 213 | panic(err) |
| 214 | } |
| 215 | return count |
| 216 | } |
| 217 | |
| 218 | // Exist returns true if the query has elements in the graph. |
| 219 | func (sq *SettingQuery) Exist(ctx context.Context) (bool, error) { |