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

Method QueryFile

ent/client.go:594–607  ·  view source on GitHub ↗

QueryFile queries the file edge of a DirectLink.

(dl *DirectLink)

Source from the content-addressed store, hash-verified

592
593// QueryFile queries the file edge of a DirectLink.
594func (c *DirectLinkClient) QueryFile(dl *DirectLink) *FileQuery {
595 query := (&FileClient{config: c.config}).Query()
596 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
597 id := dl.ID
598 step := sqlgraph.NewStep(
599 sqlgraph.From(directlink.Table, directlink.FieldID, id),
600 sqlgraph.To(file.Table, file.FieldID),
601 sqlgraph.Edge(sqlgraph.M2O, true, directlink.FileTable, directlink.FileColumn),
602 )
603 fromV = sqlgraph.Neighbors(dl.driver.Dialect(), step)
604 return fromV, nil
605 }
606 return query
607}
608
609// Hooks returns the client hooks.
610func (c *DirectLinkClient) Hooks() []Hook {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected