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

Method QueryStorageFile

ent/nodeversion_query.go:95–114  ·  view source on GitHub ↗

QueryStorageFile chains the current query on the "storage_file" edge.

()

Source from the content-addressed store, hash-verified

93
94// QueryStorageFile chains the current query on the "storage_file" edge.
95func (nvq *NodeVersionQuery) QueryStorageFile() *StorageFileQuery {
96 query := (&StorageFileClient{config: nvq.config}).Query()
97 query.path = func(ctx context.Context) (fromU *sql.Selector, err error) {
98 if err := nvq.prepareQuery(ctx); err != nil {
99 return nil, err
100 }
101 selector := nvq.sqlQuery(ctx)
102 if err := selector.Err(); err != nil {
103 return nil, err
104 }
105 step := sqlgraph.NewStep(
106 sqlgraph.From(nodeversion.Table, nodeversion.FieldID, selector),
107 sqlgraph.To(storagefile.Table, storagefile.FieldID),
108 sqlgraph.Edge(sqlgraph.M2O, false, nodeversion.StorageFileTable, nodeversion.StorageFileColumn),
109 )
110 fromU = sqlgraph.SetNeighbors(nvq.driver.Dialect(), step)
111 return fromU, nil
112 }
113 return query
114}
115
116// QueryComfyNodes chains the current query on the "comfy_nodes" edge.
117func (nvq *NodeVersionQuery) QueryComfyNodes() *ComfyNodeQuery {

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