Example #1
0
func TestLimit(t *testing.T) {
	limit := nodes.Limit(1)
	expected := "LIMIT 1"
	if got, _ := sql.Accept(limit); expected != got {
		t.Errorf("TestLimit was expected to return %s, got %s", expected, got)
	}
}
Example #2
0
// Sets the Tree's Limit to the given integer.
func (self *UpdateManager) Limit(expr interface{}) *UpdateManager {
	self.Tree.Limit = nodes.Limit(expr)
	return self
}
Example #3
0
// Sets the Tree's Limit to the given integer.
func (self *SelectManager) Limit(take int) *SelectManager {
	self.Tree.Limit = nodes.Limit(take)
	return self
}