FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 72 | |
| 73 | // FirstX is like First, but panics if an error occurs. |
| 74 | func (sq *SettingQuery) FirstX(ctx context.Context) *Setting { |
| 75 | node, err := sq.First(ctx) |
| 76 | if err != nil && !IsNotFound(err) { |
| 77 | panic(err) |
| 78 | } |
| 79 | return node |
| 80 | } |
| 81 | |
| 82 | // FirstID returns the first Setting ID from the query. |
| 83 | // Returns a *NotFoundError when no Setting ID was found. |
nothing calls this directly
no test coverage detected