withCASBackend sets the old CASBackend of the mutation.
(node *CASBackend)
| 1830 | |
| 1831 | // withCASBackend sets the old CASBackend of the mutation. |
| 1832 | func withCASBackend(node *CASBackend) casbackendOption { |
| 1833 | return func(m *CASBackendMutation) { |
| 1834 | m.oldValue = func(context.Context) (*CASBackend, error) { |
| 1835 | return node, nil |
| 1836 | } |
| 1837 | m.id = &node.ID |
| 1838 | } |
| 1839 | } |
| 1840 | |
| 1841 | // Client returns a new `ent.Client` from the mutation. If the mutation was |
| 1842 | // executed in a transaction (ent.Tx), a transactional client is returned. |