QueryEntities queries the entities edge of a File.
(f *File)
| 1006 | |
| 1007 | // QueryEntities queries the entities edge of a File. |
| 1008 | func (c *FileClient) QueryEntities(f *File) *EntityQuery { |
| 1009 | query := (&EntityClient{config: c.config}).Query() |
| 1010 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 1011 | id := f.ID |
| 1012 | step := sqlgraph.NewStep( |
| 1013 | sqlgraph.From(file.Table, file.FieldID, id), |
| 1014 | sqlgraph.To(entity.Table, entity.FieldID), |
| 1015 | sqlgraph.Edge(sqlgraph.M2M, false, file.EntitiesTable, file.EntitiesPrimaryKey...), |
| 1016 | ) |
| 1017 | fromV = sqlgraph.Neighbors(f.driver.Dialect(), step) |
| 1018 | return fromV, nil |
| 1019 | } |
| 1020 | return query |
| 1021 | } |
| 1022 | |
| 1023 | // QueryShares queries the shares edge of a File. |
| 1024 | func (c *FileClient) QueryShares(f *File) *ShareQuery { |