FirstIDX is like FirstID, but panics if an error occurs.
(ctx context.Context)
| 168 | |
| 169 | // FirstIDX is like FirstID, but panics if an error occurs. |
| 170 | func (eq *EntityQuery) FirstIDX(ctx context.Context) int { |
| 171 | id, err := eq.FirstID(ctx) |
| 172 | if err != nil && !IsNotFound(err) { |
| 173 | panic(err) |
| 174 | } |
| 175 | return id |
| 176 | } |
| 177 | |
| 178 | // Only returns a single Entity entity found by the query, ensuring it only returns one. |
| 179 | // Returns a *NotSingularError when more than one Entity entity is found. |
nothing calls this directly
no test coverage detected