MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / AddedField

Method AddedField

ent/mutation.go:12290–12300  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
12290func (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

Callers

nothing calls this directly

Calls 3

AddedViewsMethod · 0.95
AddedDownloadsMethod · 0.95
AddedRemainDownloadsMethod · 0.95

Tested by

no test coverage detected