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