(ctx context.Context)
| 1025 | } |
| 1026 | |
| 1027 | func (uq *UserQuery) sqlCount(ctx context.Context) (int, error) { |
| 1028 | _spec := uq.querySpec() |
| 1029 | _spec.Node.Columns = uq.ctx.Fields |
| 1030 | if len(uq.ctx.Fields) > 0 { |
| 1031 | _spec.Unique = uq.ctx.Unique != nil && *uq.ctx.Unique |
| 1032 | } |
| 1033 | return sqlgraph.CountNodes(ctx, uq.driver, _spec) |
| 1034 | } |
| 1035 | |
| 1036 | func (uq *UserQuery) querySpec() *sqlgraph.QuerySpec { |
| 1037 | _spec := sqlgraph.NewQuerySpec(user.Table, user.Columns, sqlgraph.NewFieldSpec(user.FieldID, field.TypeInt)) |