MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / mutate

Method mutate

app/controlplane/pkg/data/ent/client.go:1195–1208  ·  view source on GitHub ↗
(ctx context.Context, m *GroupMutation)

Source from the content-addressed store, hash-verified

1193}
1194
1195func (c *GroupClient) mutate(ctx context.Context, m *GroupMutation) (Value, error) {
1196 switch m.Op() {
1197 case OpCreate:
1198 return (&GroupCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1199 case OpUpdate:
1200 return (&GroupUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1201 case OpUpdateOne:
1202 return (&GroupUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx)
1203 case OpDelete, OpDeleteOne:
1204 return (&GroupDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx)
1205 default:
1206 return nil, fmt.Errorf("ent: unknown Group mutation op: %q", m.Op())
1207 }
1208}
1209
1210// GroupMembershipClient is a client for the GroupMembership schema.
1211type GroupMembershipClient struct {

Callers

nothing calls this directly

Calls 4

HooksMethod · 0.95
SaveMethod · 0.65
ExecMethod · 0.65
OpMethod · 0.45

Tested by

no test coverage detected