FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 194 | |
| 195 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 196 | func (_q *AlertQuery) FirstIDX(ctx context.Context) int { |
| 197 | id, err := _q.FirstID(ctx) |
| 198 | if err != nil && !IsNotFound(err) { |
| 199 | panic(err) |
| 200 | } |
| 201 | return id |
| 202 | } |
| 203 | |
| 204 | // Only returns a single Alert entity found by the query, ensuring it only returns one. |
| 205 | // Returns a *NotSingularError when more than one Alert entity is found. |
nothing calls this directly
no test coverage detected