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

Method QueryFiles

ent/client.go:2947–2960  ·  view source on GitHub ↗

QueryFiles queries the files edge of a User.

(u *User)

Source from the content-addressed store, hash-verified

2945
2946// QueryFiles queries the files edge of a User.
2947func (c *UserClient) QueryFiles(u *User) *FileQuery {
2948 query := (&FileClient{config: c.config}).Query()
2949 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2950 id := u.ID
2951 step := sqlgraph.NewStep(
2952 sqlgraph.From(user.Table, user.FieldID, id),
2953 sqlgraph.To(file.Table, file.FieldID),
2954 sqlgraph.Edge(sqlgraph.O2M, false, user.FilesTable, user.FilesColumn),
2955 )
2956 fromV = sqlgraph.Neighbors(u.driver.Dialect(), step)
2957 return fromV, nil
2958 }
2959 return query
2960}
2961
2962// QueryDavAccounts queries the dav_accounts edge of a User.
2963func (c *UserClient) QueryDavAccounts(u *User) *DavAccountQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected