(ctx context.Context)
| 588 | } |
| 589 | |
| 590 | func (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 | |
| 602 | func (nq *NodeQuery) querySpec() *sqlgraph.QuerySpec { |
| 603 | _spec := sqlgraph.NewQuerySpec(node.Table, node.Columns, sqlgraph.NewFieldSpec(node.FieldID, field.TypeString)) |
no test coverage detected