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