MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / storeCluster

Struct storeCluster

stores/cluster/cluster.go:21–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 Count(ctx context.Context) (map[string]int, error)
20}
21type storeCluster struct {
22 store.Store[Cluster] // 用struct方式继承,会自动填充并初始化表
23}
24
25func (s *storeCluster) Count(ctx context.Context) (map[string]int, error) {
26 rows, err := s.DB(ctx).Model(&Cluster{}).Select([]string{`partition`, "count(*)"}).Group("partition").Rows()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected