MCPcopy
hub / github.com/go-gorm/gorm / Count

Method Count

generics.go:581–585  ·  view source on GitHub ↗
(ctx context.Context, column string)

Source from the content-addressed store, hash-verified

579}
580
581func (c chainG[T]) Count(ctx context.Context, column string) (result int64, err error) {
582 var r T
583 err = c.g.apply(ctx).Model(r).Select(column).Count(&result).Error
584 return
585}
586
587func (c chainG[T]) Build(builder clause.Builder) {
588 subdb := c.getInstance()

Callers

nothing calls this directly

Calls 4

ModelMethod · 0.80
applyMethod · 0.80
CountMethod · 0.65
SelectMethod · 0.65

Tested by

no test coverage detected