FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 121 | |
| 122 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 123 | func (_q *MachineQuery) FirstIDX(ctx context.Context) int { |
| 124 | id, err := _q.FirstID(ctx) |
| 125 | if err != nil && !IsNotFound(err) { |
| 126 | panic(err) |
| 127 | } |
| 128 | return id |
| 129 | } |
| 130 | |
| 131 | // Only returns a single Machine entity found by the query, ensuring it only returns one. |
| 132 | // Returns a *NotSingularError when more than one Machine entity is found. |
nothing calls this directly
no test coverage detected