MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / QueryMetadata

Method QueryMetadata

ent/client.go:992–1005  ·  view source on GitHub ↗

QueryMetadata queries the metadata edge of a File.

(f *File)

Source from the content-addressed store, hash-verified

990
991// QueryMetadata queries the metadata edge of a File.
992func (c *FileClient) QueryMetadata(f *File) *MetadataQuery {
993 query := (&MetadataClient{config: c.config}).Query()
994 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
995 id := f.ID
996 step := sqlgraph.NewStep(
997 sqlgraph.From(file.Table, file.FieldID, id),
998 sqlgraph.To(metadata.Table, metadata.FieldID),
999 sqlgraph.Edge(sqlgraph.O2M, false, file.MetadataTable, file.MetadataColumn),
1000 )
1001 fromV = sqlgraph.Neighbors(f.driver.Dialect(), step)
1002 return fromV, nil
1003 }
1004 return query
1005}
1006
1007// QueryEntities queries the entities edge of a File.
1008func (c *FileClient) QueryEntities(f *File) *EntityQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected