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

Method ClearField

app/controlplane/pkg/data/ent/mutation.go:14902–14915  ·  view source on GitHub ↗

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

(name string)

Source from the content-addressed store, hash-verified

14900// ClearField clears the value of the field with the given name. It returns an
14901// error if the field is not defined in the schema.
14902func (m *UserMutation) ClearField(name string) error {
14903 switch name {
14904 case user.FieldHasRestrictedAccess:
14905 m.ClearHasRestrictedAccess()
14906 return nil
14907 case user.FieldFirstName:
14908 m.ClearFirstName()
14909 return nil
14910 case user.FieldLastName:
14911 m.ClearLastName()
14912 return nil
14913 }
14914 return fmt.Errorf("unknown User nullable field %s", name)
14915}
14916
14917// ResetField resets all changes in the mutation for the field with the given name.
14918// It returns an error if the field is not defined in the schema.

Callers 15

sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45
sqlSaveMethod · 0.45

Calls 3

ClearFirstNameMethod · 0.95
ClearLastNameMethod · 0.95

Tested by

no test coverage detected