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

Method QueryComfyNodes

ent/nodeversion_query.go:117–136  ·  view source on GitHub ↗

QueryComfyNodes chains the current query on the "comfy_nodes" edge.

()

Source from the content-addressed store, hash-verified

115
116// QueryComfyNodes chains the current query on the "comfy_nodes" edge.
117func (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.

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