ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
(name string)
| 12384 | // ResetField resets all changes in the mutation for the field with the given name. |
| 12385 | // It returns an error if the field is not defined in the schema. |
| 12386 | func (m *ShareMutation) ResetField(name string) error { |
| 12387 | switch name { |
| 12388 | case share.FieldCreatedAt: |
| 12389 | m.ResetCreatedAt() |
| 12390 | return nil |
| 12391 | case share.FieldUpdatedAt: |
| 12392 | m.ResetUpdatedAt() |
| 12393 | return nil |
| 12394 | case share.FieldDeletedAt: |
| 12395 | m.ResetDeletedAt() |
| 12396 | return nil |
| 12397 | case share.FieldPassword: |
| 12398 | m.ResetPassword() |
| 12399 | return nil |
| 12400 | case share.FieldViews: |
| 12401 | m.ResetViews() |
| 12402 | return nil |
| 12403 | case share.FieldDownloads: |
| 12404 | m.ResetDownloads() |
| 12405 | return nil |
| 12406 | case share.FieldExpires: |
| 12407 | m.ResetExpires() |
| 12408 | return nil |
| 12409 | case share.FieldRemainDownloads: |
| 12410 | m.ResetRemainDownloads() |
| 12411 | return nil |
| 12412 | case share.FieldProps: |
| 12413 | m.ResetProps() |
| 12414 | return nil |
| 12415 | } |
| 12416 | return fmt.Errorf("unknown Share field %s", name) |
| 12417 | } |
| 12418 | |
| 12419 | // AddedEdges returns all edge names that were set/added in this mutation. |
| 12420 | func (m *ShareMutation) AddedEdges() []string { |
nothing calls this directly
no test coverage detected