FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 97 | |
| 98 | // FirstX is like First, but panics if an error occurs. |
| 99 | func (_q *MetaQuery) FirstX(ctx context.Context) *Meta { |
| 100 | node, err := _q.First(ctx) |
| 101 | if err != nil && !IsNotFound(err) { |
| 102 | panic(err) |
| 103 | } |
| 104 | return node |
| 105 | } |
| 106 | |
| 107 | // FirstID returns the first Meta ID from the query. |
| 108 | // Returns a *NotFoundError when no Meta ID was found. |
nothing calls this directly
no test coverage detected