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

Method sqlCount

ent/oauthclient_query.go:436–443  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

434}
435
436func (ocq *OAuthClientQuery) sqlCount(ctx context.Context) (int, error) {
437 _spec := ocq.querySpec()
438 _spec.Node.Columns = ocq.ctx.Fields
439 if len(ocq.ctx.Fields) > 0 {
440 _spec.Unique = ocq.ctx.Unique != nil && *ocq.ctx.Unique
441 }
442 return sqlgraph.CountNodes(ctx, ocq.driver, _spec)
443}
444
445func (ocq *OAuthClientQuery) querySpec() *sqlgraph.QuerySpec {
446 _spec := sqlgraph.NewQuerySpec(oauthclient.Table, oauthclient.Columns, sqlgraph.NewFieldSpec(oauthclient.FieldID, field.TypeInt))

Callers

nothing calls this directly

Calls 1

querySpecMethod · 0.95

Tested by

no test coverage detected