(ctx context.Context)
| 238 | } |
| 239 | |
| 240 | func (tc *TaskCreate) sqlSave(ctx context.Context) (*Task, error) { |
| 241 | if err := tc.check(); err != nil { |
| 242 | return nil, err |
| 243 | } |
| 244 | _node, _spec := tc.createSpec() |
| 245 | if err := sqlgraph.CreateNode(ctx, tc.driver, _spec); err != nil { |
| 246 | if sqlgraph.IsConstraintError(err) { |
| 247 | err = &ConstraintError{msg: err.Error(), wrap: err} |
| 248 | } |
| 249 | return nil, err |
| 250 | } |
| 251 | id := _spec.ID.Value.(int64) |
| 252 | _node.ID = int(id) |
| 253 | tc.mutation.id = &_node.ID |
| 254 | tc.mutation.done = true |
| 255 | return _node, nil |
| 256 | } |
| 257 | |
| 258 | func (tc *TaskCreate) createSpec() (*Task, *sqlgraph.CreateSpec) { |
| 259 | var ( |
nothing calls this directly
no test coverage detected