(ctx context.Context)
| 175 | } |
| 176 | |
| 177 | func (dlc *DirectLinkCreate) sqlSave(ctx context.Context) (*DirectLink, error) { |
| 178 | if err := dlc.check(); err != nil { |
| 179 | return nil, err |
| 180 | } |
| 181 | _node, _spec := dlc.createSpec() |
| 182 | if err := sqlgraph.CreateNode(ctx, dlc.driver, _spec); err != nil { |
| 183 | if sqlgraph.IsConstraintError(err) { |
| 184 | err = &ConstraintError{msg: err.Error(), wrap: err} |
| 185 | } |
| 186 | return nil, err |
| 187 | } |
| 188 | id := _spec.ID.Value.(int64) |
| 189 | _node.ID = int(id) |
| 190 | dlc.mutation.id = &_node.ID |
| 191 | dlc.mutation.done = true |
| 192 | return _node, nil |
| 193 | } |
| 194 | |
| 195 | func (dlc *DirectLinkCreate) createSpec() (*DirectLink, *sqlgraph.CreateSpec) { |
| 196 | var ( |
nothing calls this directly
no test coverage detected