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