FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 286 | |
| 287 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 288 | func (fq *FileQuery) FirstIDX(ctx context.Context) int { |
| 289 | id, err := fq.FirstID(ctx) |
| 290 | if err != nil && !IsNotFound(err) { |
| 291 | panic(err) |
| 292 | } |
| 293 | return id |
| 294 | } |
| 295 | |
| 296 | // Only returns a single File entity found by the query, ensuring it only returns one. |
| 297 | // Returns a *NotSingularError when more than one File entity is found. |
nothing calls this directly
no test coverage detected