| 514 | } |
| 515 | |
| 516 | func (_q *GroupQuery) sqlCount(ctx context.Context) (int, error) { |
| 517 | _spec := _q.querySpec() |
| 518 | if len(_q.modifiers) > 0 { |
| 519 | _spec.Modifiers = _q.modifiers |
| 520 | } |
| 521 | _spec.Node.Columns = _q.ctx.Fields |
| 522 | if len(_q.ctx.Fields) > 0 { |
| 523 | _spec.Unique = _q.ctx.Unique != nil && *_q.ctx.Unique |
| 524 | } |
| 525 | return sqlgraph.CountNodes(ctx, _q.driver, _spec) |
| 526 | } |
| 527 | |
| 528 | func (_q *GroupQuery) querySpec() *sqlgraph.QuerySpec { |
| 529 | _spec := sqlgraph.NewQuerySpec(group.Table, group.Columns, sqlgraph.NewFieldSpec(group.FieldID, field.TypeUUID)) |