MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / QueryPublisherPermissions

Method QueryPublisherPermissions

ent/user_query.go:69–88  ·  view source on GitHub ↗

QueryPublisherPermissions chains the current query on the "publisher_permissions" edge.

()

Source from the content-addressed store, hash-verified

67
68// QueryPublisherPermissions chains the current query on the "publisher_permissions" edge.
69func (uq *UserQuery) QueryPublisherPermissions() *PublisherPermissionQuery {
70 query := (&PublisherPermissionClient{config: uq.config}).Query()
71 query.path = func(ctx context.Context) (fromU *sql.Selector, err error) {
72 if err := uq.prepareQuery(ctx); err != nil {
73 return nil, err
74 }
75 selector := uq.sqlQuery(ctx)
76 if err := selector.Err(); err != nil {
77 return nil, err
78 }
79 step := sqlgraph.NewStep(
80 sqlgraph.From(user.Table, user.FieldID, selector),
81 sqlgraph.To(publisherpermission.Table, publisherpermission.FieldID),
82 sqlgraph.Edge(sqlgraph.O2M, false, user.PublisherPermissionsTable, user.PublisherPermissionsColumn),
83 )
84 fromU = sqlgraph.SetNeighbors(uq.driver.Dialect(), step)
85 return fromU, nil
86 }
87 return query
88}
89
90// QueryReviews chains the current query on the "reviews" edge.
91func (uq *UserQuery) QueryReviews() *NodeReviewQuery {

Callers

nothing calls this directly

Calls 4

prepareQueryMethod · 0.95
sqlQueryMethod · 0.95
DialectMethod · 0.80
QueryMethod · 0.45

Tested by

no test coverage detected