FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 97 | |
| 98 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 99 | func (_q *DBPackageQuery) FirstIDX(ctx context.Context) int { |
| 100 | id, err := _q.FirstID(ctx) |
| 101 | if err != nil && !IsNotFound(err) { |
| 102 | panic(err) |
| 103 | } |
| 104 | return id |
| 105 | } |
| 106 | |
| 107 | // Only returns a single DBPackage entity found by the query, ensuring it only returns one. |
| 108 | // Returns a *NotSingularError when more than one DBPackage entity is found. |
nothing calls this directly
no test coverage detected