SaveX calls Save and panics if Save returns an error.
(ctx context.Context)
| 73 | |
| 74 | // SaveX calls Save and panics if Save returns an error. |
| 75 | func (mc *ModelCreate) SaveX(ctx context.Context) *Model { |
| 76 | v, err := mc.Save(ctx) |
| 77 | if err != nil { |
| 78 | panic(err) |
| 79 | } |
| 80 | return v |
| 81 | } |
| 82 | |
| 83 | // Exec executes the query. |
| 84 | func (mc *ModelCreate) Exec(ctx context.Context) error { |