withCASMapping sets the old CASMapping of the mutation.
(node *CASMapping)
| 3208 | |
| 3209 | // withCASMapping sets the old CASMapping of the mutation. |
| 3210 | func withCASMapping(node *CASMapping) casmappingOption { |
| 3211 | return func(m *CASMappingMutation) { |
| 3212 | m.oldValue = func(context.Context) (*CASMapping, error) { |
| 3213 | return node, nil |
| 3214 | } |
| 3215 | m.id = &node.ID |
| 3216 | } |
| 3217 | } |
| 3218 | |
| 3219 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 3220 | // executed in a transaction (ent.Tx), a transactional client is returned. |