MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Field

Method Field

ent/mutation.go:12148–12170  ·  view source on GitHub ↗

Field returns the value of 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

12146// return value indicates that this field was not set, or was not defined in the
12147// schema.
12148func (m *ShareMutation) Field(name string) (ent.Value, bool) {
12149 switch name {
12150 case share.FieldCreatedAt:
12151 return m.CreatedAt()
12152 case share.FieldUpdatedAt:
12153 return m.UpdatedAt()
12154 case share.FieldDeletedAt:
12155 return m.DeletedAt()
12156 case share.FieldPassword:
12157 return m.Password()
12158 case share.FieldViews:
12159 return m.Views()
12160 case share.FieldDownloads:
12161 return m.Downloads()
12162 case share.FieldExpires:
12163 return m.Expires()
12164 case share.FieldRemainDownloads:
12165 return m.RemainDownloads()
12166 case share.FieldProps:
12167 return m.Props()
12168 }
12169 return nil, false
12170}
12171
12172// OldField returns the old value of the field from the database. An error is
12173// returned if the mutation operation is not UpdateOne, or the query to the

Callers

nothing calls this directly

Calls 9

CreatedAtMethod · 0.95
UpdatedAtMethod · 0.95
DeletedAtMethod · 0.95
PasswordMethod · 0.95
ViewsMethod · 0.95
DownloadsMethod · 0.95
ExpiresMethod · 0.95
RemainDownloadsMethod · 0.95
PropsMethod · 0.95

Tested by

no test coverage detected