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

Method check

app/controlplane/pkg/data/ent/group_update.go:218–228  ·  view source on GitHub ↗

check runs all checks and user-defined validators on the builder.

()

Source from the content-addressed store, hash-verified

216
217// check runs all checks and user-defined validators on the builder.
218func (_u *GroupUpdate) check() error {
219 if v, ok := _u.mutation.Name(); ok {
220 if err := group.NameValidator(v); err != nil {
221 return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Group.name": %w`, err)}
222 }
223 }
224 if _u.mutation.OrganizationCleared() && len(_u.mutation.OrganizationIDs()) > 0 {
225 return errors.New(`ent: clearing a required unique edge "Group.organization"`)
226 }
227 return nil
228}
229
230// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
231func (_u *GroupUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GroupUpdate {

Callers 1

sqlSaveMethod · 0.95

Calls 3

NameMethod · 0.45
OrganizationClearedMethod · 0.45
OrganizationIDsMethod · 0.45

Tested by

no test coverage detected