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

Method QueryDavAccounts

ent/client.go:2963–2976  ·  view source on GitHub ↗

QueryDavAccounts queries the dav_accounts edge of a User.

(u *User)

Source from the content-addressed store, hash-verified

2961
2962// QueryDavAccounts queries the dav_accounts edge of a User.
2963func (c *UserClient) QueryDavAccounts(u *User) *DavAccountQuery {
2964 query := (&DavAccountClient{config: c.config}).Query()
2965 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2966 id := u.ID
2967 step := sqlgraph.NewStep(
2968 sqlgraph.From(user.Table, user.FieldID, id),
2969 sqlgraph.To(davaccount.Table, davaccount.FieldID),
2970 sqlgraph.Edge(sqlgraph.O2M, false, user.DavAccountsTable, user.DavAccountsColumn),
2971 )
2972 fromV = sqlgraph.Neighbors(u.driver.Dialect(), step)
2973 return fromV, nil
2974 }
2975 return query
2976}
2977
2978// QueryShares queries the shares edge of a User.
2979func (c *UserClient) QueryShares(u *User) *ShareQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected