github.com/dkishere/pop@v4.13.1+incompatible/query_having.go (about)

     1  package pop
     2  
     3  import "github.com/gobuffalo/pop/logging"
     4  
     5  // Having will append a HAVING clause to the query
     6  func (q *Query) Having(condition string, args ...interface{}) *Query {
     7  	if q.RawSQL.Fragment != "" {
     8  		log(logging.Warn, "Query is setup to use raw SQL")
     9  		return q
    10  	}
    11  	q.havingClauses = append(q.havingClauses, HavingClause{condition, args})
    12  
    13  	return q
    14  }