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