(ctx context.Context)
| 186 | } |
| 187 | |
| 188 | func (_c *ConversionCreate) sqlSave(ctx context.Context) (*Conversion, error) { |
| 189 | if err := _c.check(); err != nil { |
| 190 | return nil, err |
| 191 | } |
| 192 | _node, _spec := _c.createSpec() |
| 193 | if err := sqlgraph.CreateNode(ctx, _c.driver, _spec); err != nil { |
| 194 | if sqlgraph.IsConstraintError(err) { |
| 195 | err = &ConstraintError{msg: err.Error(), wrap: err} |
| 196 | } |
| 197 | return nil, err |
| 198 | } |
| 199 | id := _spec.ID.Value.(int64) |
| 200 | _node.ID = int(id) |
| 201 | _c.mutation.id = &_node.ID |
| 202 | _c.mutation.done = true |
| 203 | return _node, nil |
| 204 | } |
| 205 | |
| 206 | func (_c *ConversionCreate) createSpec() (*Conversion, *sqlgraph.CreateSpec) { |
| 207 | var ( |
nothing calls this directly
no test coverage detected