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

Method QueryShares

ent/client.go:2979–2992  ·  view source on GitHub ↗

QueryShares queries the shares edge of a User.

(u *User)

Source from the content-addressed store, hash-verified

2977
2978// QueryShares queries the shares edge of a User.
2979func (c *UserClient) QueryShares(u *User) *ShareQuery {
2980 query := (&ShareClient{config: c.config}).Query()
2981 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2982 id := u.ID
2983 step := sqlgraph.NewStep(
2984 sqlgraph.From(user.Table, user.FieldID, id),
2985 sqlgraph.To(share.Table, share.FieldID),
2986 sqlgraph.Edge(sqlgraph.O2M, false, user.SharesTable, user.SharesColumn),
2987 )
2988 fromV = sqlgraph.Neighbors(u.driver.Dialect(), step)
2989 return fromV, nil
2990 }
2991 return query
2992}
2993
2994// QueryPasskey queries the passkey edge of a User.
2995func (c *UserClient) QueryPasskey(u *User) *PasskeyQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected