QueryShares chains the current query on the "shares" edge.
()
| 144 | |
| 145 | // QueryShares chains the current query on the "shares" edge. |
| 146 | func (uq *UserQuery) QueryShares() *ShareQuery { |
| 147 | query := (&ShareClient{config: uq.config}).Query() |
| 148 | query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { |
| 149 | if err := uq.prepareQuery(ctx); err != nil { |
| 150 | return nil, err |
| 151 | } |
| 152 | selector := uq.sqlQuery(ctx) |
| 153 | if err := selector.Err(); err != nil { |
| 154 | return nil, err |
| 155 | } |
| 156 | step := sqlgraph.NewStep( |
| 157 | sqlgraph.From(user.Table, user.FieldID, selector), |
| 158 | sqlgraph.To(share.Table, share.FieldID), |
| 159 | sqlgraph.Edge(sqlgraph.O2M, false, user.SharesTable, user.SharesColumn), |
| 160 | ) |
| 161 | fromU = sqlgraph.SetNeighbors(uq.driver.Dialect(), step) |
| 162 | return fromU, nil |
| 163 | } |
| 164 | return query |
| 165 | } |
| 166 | |
| 167 | // QueryPasskey chains the current query on the "passkey" edge. |
| 168 | func (uq *UserQuery) QueryPasskey() *PasskeyQuery { |
nothing calls this directly
no test coverage detected