AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
(name string)
| 12288 | // with the given name. The second boolean return value indicates that this field |
| 12289 | // was not set, or was not defined in the schema. |
| 12290 | func (m *ShareMutation) AddedField(name string) (ent.Value, bool) { |
| 12291 | switch name { |
| 12292 | case share.FieldViews: |
| 12293 | return m.AddedViews() |
| 12294 | case share.FieldDownloads: |
| 12295 | return m.AddedDownloads() |
| 12296 | case share.FieldRemainDownloads: |
| 12297 | return m.AddedRemainDownloads() |
| 12298 | } |
| 12299 | return nil, false |
| 12300 | } |
| 12301 | |
| 12302 | // AddField adds the value to the field with the given name. It returns an error if |
| 12303 | // the field is not defined in the schema, or if the type mismatched the field |
nothing calls this directly
no test coverage detected