withMembership sets the old Membership of the mutation.
(node *Membership)
| 7076 | |
| 7077 | // withMembership sets the old Membership of the mutation. |
| 7078 | func withMembership(node *Membership) membershipOption { |
| 7079 | return func(m *MembershipMutation) { |
| 7080 | m.oldValue = func(context.Context) (*Membership, error) { |
| 7081 | return node, nil |
| 7082 | } |
| 7083 | m.id = &node.ID |
| 7084 | } |
| 7085 | } |
| 7086 | |
| 7087 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 7088 | // executed in a transaction (ent.Tx), a transactional client is returned. |