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

Method sqlCount

ent/node_query.go:590–600  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

588}
589
590func (nq *NodeQuery) sqlCount(ctx context.Context) (int, error) {
591 _spec := nq.querySpec()
592 if len(nq.modifiers) > 0 {
593 _spec.Modifiers = nq.modifiers
594 }
595 _spec.Node.Columns = nq.ctx.Fields
596 if len(nq.ctx.Fields) > 0 {
597 _spec.Unique = nq.ctx.Unique != nil && *nq.ctx.Unique
598 }
599 return sqlgraph.CountNodes(ctx, nq.driver, _spec)
600}
601
602func (nq *NodeQuery) querySpec() *sqlgraph.QuerySpec {
603 _spec := sqlgraph.NewQuerySpec(node.Table, node.Columns, sqlgraph.NewFieldSpec(node.FieldID, field.TypeString))

Callers 1

querierCountFunction · 0.45

Calls 1

querySpecMethod · 0.95

Tested by

no test coverage detected