MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / sqlCount

Method sqlCount

ent/group_query.go:508–515  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

506}
507
508func (gq *GroupQuery) sqlCount(ctx context.Context) (int, error) {
509 _spec := gq.querySpec()
510 _spec.Node.Columns = gq.ctx.Fields
511 if len(gq.ctx.Fields) > 0 {
512 _spec.Unique = gq.ctx.Unique != nil && *gq.ctx.Unique
513 }
514 return sqlgraph.CountNodes(ctx, gq.driver, _spec)
515}
516
517func (gq *GroupQuery) querySpec() *sqlgraph.QuerySpec {
518 _spec := sqlgraph.NewQuerySpec(group.Table, group.Columns, sqlgraph.NewFieldSpec(group.FieldID, field.TypeInt))

Callers

nothing calls this directly

Calls 1

querySpecMethod · 0.95

Tested by

no test coverage detected