OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 175 | |
| 176 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 177 | func (nq *NodeQuery) OnlyIDX(ctx context.Context) int { |
| 178 | id, err := nq.OnlyID(ctx) |
| 179 | if err != nil { |
| 180 | panic(err) |
| 181 | } |
| 182 | return id |
| 183 | } |
| 184 | |
| 185 | // All executes the query and returns a list of Nodes. |
| 186 | func (nq *NodeQuery) All(ctx context.Context) ([]*Node, error) { |