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

Method prepareQuery

ent/nodeversion_query.go:421–445  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

419}
420
421func (nvq *NodeVersionQuery) prepareQuery(ctx context.Context) error {
422 for _, inter := range nvq.inters {
423 if inter == nil {
424 return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)")
425 }
426 if trv, ok := inter.(Traverser); ok {
427 if err := trv.Traverse(ctx, nvq); err != nil {
428 return err
429 }
430 }
431 }
432 for _, f := range nvq.ctx.Fields {
433 if !nodeversion.ValidColumn(f) {
434 return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
435 }
436 }
437 if nvq.path != nil {
438 prev, err := nvq.path(ctx)
439 if err != nil {
440 return err
441 }
442 nvq.sql = prev
443 }
444 return nil
445}
446
447func (nvq *NodeVersionQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*NodeVersion, error) {
448 var (

Callers 7

QueryNodeMethod · 0.95
QueryStorageFileMethod · 0.95
QueryComfyNodesMethod · 0.95
AllMethod · 0.95
CountMethod · 0.95
ScanMethod · 0.45
ScanMethod · 0.45

Calls 1

ValidColumnFunction · 0.92

Tested by

no test coverage detected