| 19 | Count(ctx context.Context) (map[string]int, error) |
| 20 | } |
| 21 | type storeCluster struct { |
| 22 | store.Store[Cluster] // 用struct方式继承,会自动填充并初始化表 |
| 23 | } |
| 24 | |
| 25 | func (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() |
nothing calls this directly
no outgoing calls
no test coverage detected