QueryChildren queries the children edge of a File.
(f *File)
| 974 | |
| 975 | // QueryChildren queries the children edge of a File. |
| 976 | func (c *FileClient) QueryChildren(f *File) *FileQuery { |
| 977 | query := (&FileClient{config: c.config}).Query() |
| 978 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 979 | id := f.ID |
| 980 | step := sqlgraph.NewStep( |
| 981 | sqlgraph.From(file.Table, file.FieldID, id), |
| 982 | sqlgraph.To(file.Table, file.FieldID), |
| 983 | sqlgraph.Edge(sqlgraph.O2M, false, file.ChildrenTable, file.ChildrenColumn), |
| 984 | ) |
| 985 | fromV = sqlgraph.Neighbors(f.driver.Dialect(), step) |
| 986 | return fromV, nil |
| 987 | } |
| 988 | return query |
| 989 | } |
| 990 | |
| 991 | // QueryMetadata queries the metadata edge of a File. |
| 992 | func (c *FileClient) QueryMetadata(f *File) *MetadataQuery { |