FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 312 | |
| 313 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 314 | func (uq *UserQuery) FirstIDX(ctx context.Context) int { |
| 315 | id, err := uq.FirstID(ctx) |
| 316 | if err != nil && !IsNotFound(err) { |
| 317 | panic(err) |
| 318 | } |
| 319 | return id |
| 320 | } |
| 321 | |
| 322 | // Only returns a single User entity found by the query, ensuring it only returns one. |
| 323 | // Returns a *NotSingularError when more than one User entity is found. |
nothing calls this directly
no test coverage detected