Get returns a Machine entity by its id.
(ctx context.Context, id int)
| 1575 | |
| 1576 | // Get returns a Machine entity by its id. |
| 1577 | func (c *MachineClient) Get(ctx context.Context, id int) (*Machine, error) { |
| 1578 | return c.Query().Where(machine.ID(id)).Only(ctx) |
| 1579 | } |
| 1580 | |
| 1581 | // GetX is like Get, but panics if an error occurs. |
| 1582 | func (c *MachineClient) GetX(ctx context.Context, id int) *Machine { |