(ctx context.Context)
| 466 | } |
| 467 | |
| 468 | func (_q *AllowListQuery) sqlCount(ctx context.Context) (int, error) { |
| 469 | _spec := _q.querySpec() |
| 470 | _spec.Node.Columns = _q.ctx.Fields |
| 471 | if len(_q.ctx.Fields) > 0 { |
| 472 | _spec.Unique = _q.ctx.Unique != nil && *_q.ctx.Unique |
| 473 | } |
| 474 | return sqlgraph.CountNodes(ctx, _q.driver, _spec) |
| 475 | } |
| 476 | |
| 477 | func (_q *AllowListQuery) querySpec() *sqlgraph.QuerySpec { |
| 478 | _spec := sqlgraph.NewQuerySpec(allowlist.Table, allowlist.Columns, sqlgraph.NewFieldSpec(allowlist.FieldID, field.TypeInt)) |