Save creates the Machine in the database.
(ctx context.Context)
| 244 | |
| 245 | // Save creates the Machine in the database. |
| 246 | func (_c *MachineCreate) Save(ctx context.Context) (*Machine, error) { |
| 247 | _c.defaults() |
| 248 | return withHooks(ctx, _c.sqlSave, _c.mutation, _c.hooks) |
| 249 | } |
| 250 | |
| 251 | // SaveX calls Save and panics if Save returns an error. |
| 252 | func (_c *MachineCreate) SaveX(ctx context.Context) *Machine { |