MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / sqlCount

Method sqlCount

ent/storagefile_query.go:370–380  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

368}
369
370func (sfq *StorageFileQuery) sqlCount(ctx context.Context) (int, error) {
371 _spec := sfq.querySpec()
372 if len(sfq.modifiers) > 0 {
373 _spec.Modifiers = sfq.modifiers
374 }
375 _spec.Node.Columns = sfq.ctx.Fields
376 if len(sfq.ctx.Fields) > 0 {
377 _spec.Unique = sfq.ctx.Unique != nil && *sfq.ctx.Unique
378 }
379 return sqlgraph.CountNodes(ctx, sfq.driver, _spec)
380}
381
382func (sfq *StorageFileQuery) querySpec() *sqlgraph.QuerySpec {
383 _spec := sqlgraph.NewQuerySpec(storagefile.Table, storagefile.Columns, sqlgraph.NewFieldSpec(storagefile.FieldID, field.TypeUUID))

Callers

nothing calls this directly

Calls 1

querySpecMethod · 0.95

Tested by

no test coverage detected