(ctx context.Context)
| 305 | } |
| 306 | |
| 307 | func (_c *DecisionCreate) sqlSave(ctx context.Context) (*Decision, error) { |
| 308 | if err := _c.check(); err != nil { |
| 309 | return nil, err |
| 310 | } |
| 311 | _node, _spec := _c.createSpec() |
| 312 | if err := sqlgraph.CreateNode(ctx, _c.driver, _spec); err != nil { |
| 313 | if sqlgraph.IsConstraintError(err) { |
| 314 | err = &ConstraintError{msg: err.Error(), wrap: err} |
| 315 | } |
| 316 | return nil, err |
| 317 | } |
| 318 | id := _spec.ID.Value.(int64) |
| 319 | _node.ID = int(id) |
| 320 | _c.mutation.id = &_node.ID |
| 321 | _c.mutation.done = true |
| 322 | return _node, nil |
| 323 | } |
| 324 | |
| 325 | func (_c *DecisionCreate) createSpec() (*Decision, *sqlgraph.CreateSpec) { |
| 326 | var ( |
nothing calls this directly
no test coverage detected