FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 144 | |
| 145 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 146 | func (sq *ShareQuery) FirstIDX(ctx context.Context) int { |
| 147 | id, err := sq.FirstID(ctx) |
| 148 | if err != nil && !IsNotFound(err) { |
| 149 | panic(err) |
| 150 | } |
| 151 | return id |
| 152 | } |
| 153 | |
| 154 | // Only returns a single Share entity found by the query, ensuring it only returns one. |
| 155 | // Returns a *NotSingularError when more than one Share entity is found. |
nothing calls this directly
no test coverage detected