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

Method QueryChildren

ent/client.go:976–989  ·  view source on GitHub ↗

QueryChildren queries the children edge of a File.

(f *File)

Source from the content-addressed store, hash-verified

974
975// QueryChildren queries the children edge of a File.
976func (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.
992func (c *FileClient) QueryMetadata(f *File) *MetadataQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected