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

Method QueryFile

ent/client.go:745–758  ·  view source on GitHub ↗

QueryFile queries the file edge of a Entity.

(e *Entity)

Source from the content-addressed store, hash-verified

743
744// QueryFile queries the file edge of a Entity.
745func (c *EntityClient) QueryFile(e *Entity) *FileQuery {
746 query := (&FileClient{config: c.config}).Query()
747 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
748 id := e.ID
749 step := sqlgraph.NewStep(
750 sqlgraph.From(entity.Table, entity.FieldID, id),
751 sqlgraph.To(file.Table, file.FieldID),
752 sqlgraph.Edge(sqlgraph.M2M, true, entity.FileTable, entity.FilePrimaryKey...),
753 )
754 fromV = sqlgraph.Neighbors(e.driver.Dialect(), step)
755 return fromV, nil
756 }
757 return query
758}
759
760// QueryUser queries the user edge of a Entity.
761func (c *EntityClient) QueryUser(e *Entity) *UserQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected