QueryPublisherPermissions chains the current query on the "publisher_permissions" edge.
()
| 67 | |
| 68 | // QueryPublisherPermissions chains the current query on the "publisher_permissions" edge. |
| 69 | func (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. |
| 91 | func (uq *UserQuery) QueryReviews() *NodeReviewQuery { |
nothing calls this directly
no test coverage detected