func TestHaving(t *testing.T) { having := nodes.Having(1) expected := "HAVING 1" if got, _ := sql.Accept(having); expected != got { t.Errorf("TestHaving was expected to return %s, got %s", expected, got) } }
// Sets the Context's Having member to the given expression. func (self *SelectManager) Having(expr interface{}) *SelectManager { if _, ok := expr.(string); ok { expr = nodes.Literal(expr) } self.Context.Having = nodes.Having(expr) return self }