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