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)
| 9762 | // return value indicates that this field was not set, or was not defined in the |
| 9763 | // schema. |
| 9764 | func (m *MachineMutation) Field(name string) (ent.Value, bool) { |
| 9765 | switch name { |
| 9766 | case machine.FieldCreatedAt: |
| 9767 | return m.CreatedAt() |
| 9768 | case machine.FieldUpdatedAt: |
| 9769 | return m.UpdatedAt() |
| 9770 | case machine.FieldLastPush: |
| 9771 | return m.LastPush() |
| 9772 | case machine.FieldLastHeartbeat: |
| 9773 | return m.LastHeartbeat() |
| 9774 | case machine.FieldMachineId: |
| 9775 | return m.MachineId() |
| 9776 | case machine.FieldPassword: |
| 9777 | return m.Password() |
| 9778 | case machine.FieldIpAddress: |
| 9779 | return m.IpAddress() |
| 9780 | case machine.FieldScenarios: |
| 9781 | return m.Scenarios() |
| 9782 | case machine.FieldVersion: |
| 9783 | return m.Version() |
| 9784 | case machine.FieldIsValidated: |
| 9785 | return m.IsValidated() |
| 9786 | case machine.FieldAuthType: |
| 9787 | return m.AuthType() |
| 9788 | case machine.FieldOsname: |
| 9789 | return m.Osname() |
| 9790 | case machine.FieldOsfamily: |
| 9791 | return m.Osfamily() |
| 9792 | case machine.FieldOsversion: |
| 9793 | return m.Osversion() |
| 9794 | case machine.FieldFeatureflags: |
| 9795 | return m.Featureflags() |
| 9796 | case machine.FieldHubstate: |
| 9797 | return m.Hubstate() |
| 9798 | case machine.FieldDatasources: |
| 9799 | return m.Datasources() |
| 9800 | } |
| 9801 | return nil, false |
| 9802 | } |
| 9803 | |
| 9804 | // OldField returns the old value of the field from the database. An error is |
| 9805 | // returned if the mutation operation is not UpdateOne, or the query to the |
nothing calls this directly
no test coverage detected