FirstX is like First, but panics if an error occurs.
(ctx context.Context)
| 145 | |
| 146 | // FirstX is like First, but panics if an error occurs. |
| 147 | func (eq *EntityQuery) FirstX(ctx context.Context) *Entity { |
| 148 | node, err := eq.First(ctx) |
| 149 | if err != nil && !IsNotFound(err) { |
| 150 | panic(err) |
| 151 | } |
| 152 | return node |
| 153 | } |
| 154 | |
| 155 | // FirstID returns the first Entity ID from the query. |
| 156 | // Returns a *NotFoundError when no Entity ID was found. |
nothing calls this directly
no test coverage detected