FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
()
| 50 | // FileOrErr returns the File value or an error if the edge |
| 51 | // was not loaded in eager-loading, or loaded but was not found. |
| 52 | func (e MetadataEdges) FileOrErr() (*File, error) { |
| 53 | if e.loadedTypes[0] { |
| 54 | if e.File == nil { |
| 55 | // Edge was loaded but was not found. |
| 56 | return nil, &NotFoundError{label: file.Label} |
| 57 | } |
| 58 | return e.File, nil |
| 59 | } |
| 60 | return nil, &NotLoadedError{edge: "file"} |
| 61 | } |
| 62 | |
| 63 | // scanValues returns the types for scanning values from sql.Rows. |
| 64 | func (*Metadata) scanValues(columns []string) ([]any, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected