FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 289 | |
| 290 | // FirstX is like First, but panics if an error occurs. |
| 291 | func (uq *UserQuery) FirstX(ctx context.Context) *User { |
| 292 | node, err := uq.First(ctx) |
| 293 | if err != nil && !IsNotFound(err) { |
| 294 | panic(err) |
| 295 | } |
| 296 | return node |
| 297 | } |
| 298 | |
| 299 | // FirstID returns the first User ID from the query. |
| 300 | // Returns a *NotFoundError when no User ID was found. |
nothing calls this directly
no test coverage detected