withUser sets the old User of the mutation.
(node *User)
| 14279 | |
| 14280 | // withUser sets the old User of the mutation. |
| 14281 | func withUser(node *User) userOption { |
| 14282 | return func(m *UserMutation) { |
| 14283 | m.oldValue = func(context.Context) (*User, error) { |
| 14284 | return node, nil |
| 14285 | } |
| 14286 | m.id = &node.ID |
| 14287 | } |
| 14288 | } |
| 14289 | |
| 14290 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 14291 | // executed in a transaction (ent.Tx), a transactional client is returned. |