github.com/gobuffalo/pop@v4.13.1+incompatible/group.go (about)

     1  package pop
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  // GroupClause holds the field to apply the GROUP clause on
     8  type GroupClause struct {
     9  	Field string
    10  }
    11  
    12  type groupClauses []GroupClause
    13  
    14  func (c GroupClause) String() string {
    15  	return c.Field
    16  }
    17  
    18  func (c groupClauses) String() string {
    19  	var cs []string
    20  	for _, cl := range c {
    21  		cs = append(cs, cl.String())
    22  	}
    23  	return strings.Join(cs, ", ")
    24  }