| 1523 | } |
| 1524 | |
| 1525 | func (c *IntegrationClient) mutate(ctx context.Context, m *IntegrationMutation) (Value, error) { |
| 1526 | switch m.Op() { |
| 1527 | case OpCreate: |
| 1528 | return (&IntegrationCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1529 | case OpUpdate: |
| 1530 | return (&IntegrationUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1531 | case OpUpdateOne: |
| 1532 | return (&IntegrationUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) |
| 1533 | case OpDelete, OpDeleteOne: |
| 1534 | return (&IntegrationDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) |
| 1535 | default: |
| 1536 | return nil, fmt.Errorf("ent: unknown Integration mutation op: %q", m.Op()) |
| 1537 | } |
| 1538 | } |
| 1539 | |
| 1540 | // IntegrationAttachmentClient is a client for the IntegrationAttachment schema. |
| 1541 | type IntegrationAttachmentClient struct { |