QueryComfyNodes chains the current query on the "comfy_nodes" edge.
()
| 115 | |
| 116 | // QueryComfyNodes chains the current query on the "comfy_nodes" edge. |
| 117 | func (nvq *NodeVersionQuery) QueryComfyNodes() *ComfyNodeQuery { |
| 118 | query := (&ComfyNodeClient{config: nvq.config}).Query() |
| 119 | query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { |
| 120 | if err := nvq.prepareQuery(ctx); err != nil { |
| 121 | return nil, err |
| 122 | } |
| 123 | selector := nvq.sqlQuery(ctx) |
| 124 | if err := selector.Err(); err != nil { |
| 125 | return nil, err |
| 126 | } |
| 127 | step := sqlgraph.NewStep( |
| 128 | sqlgraph.From(nodeversion.Table, nodeversion.FieldID, selector), |
| 129 | sqlgraph.To(comfynode.Table, comfynode.FieldID), |
| 130 | sqlgraph.Edge(sqlgraph.O2M, false, nodeversion.ComfyNodesTable, nodeversion.ComfyNodesColumn), |
| 131 | ) |
| 132 | fromU = sqlgraph.SetNeighbors(nvq.driver.Dialect(), step) |
| 133 | return fromU, nil |
| 134 | } |
| 135 | return query |
| 136 | } |
| 137 | |
| 138 | // First returns the first NodeVersion entity from the query. |
| 139 | // Returns a *NotFoundError when no NodeVersion was found. |
nothing calls this directly
no test coverage detected