Save creates the Model in the database.
(ctx context.Context)
| 68 | |
| 69 | // Save creates the Model in the database. |
| 70 | func (mc *ModelCreate) Save(ctx context.Context) (*Model, error) { |
| 71 | return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks) |
| 72 | } |
| 73 | |
| 74 | // SaveX calls Save and panics if Save returns an error. |
| 75 | func (mc *ModelCreate) SaveX(ctx context.Context) *Model { |
no test coverage detected