Permalink
Browse files

Allow LIMIT and OFFSET to be reset. Fixes #3735

  • Loading branch information...
1 parent 453b7f3 commit e303e81ac3aa4a23e92aec5c218f12aaef1ffce7 @cbandy cbandy committed Jul 3, 2011
@@ -308,12 +308,12 @@ public function union($select, $all = TRUE)
/**
* Start returning results after "OFFSET ..."
*
- * @param integer starting result number
+ * @param integer starting result number or NULL to reset
* @return $this
*/
public function offset($number)
{
- $this->_offset = (int) $number;
+ $this->_offset = $number;
return $this;
}
@@ -442,4 +442,3 @@ public function reset()
}
} // End Database_Query_Select
-
@@ -147,12 +147,12 @@ public function order_by($column, $direction = NULL)
/**
* Return up to "LIMIT ..." results
*
- * @param integer maximum results to return
+ * @param integer maximum results to return or NULL to reset
* @return $this
*/
public function limit($number)
{
- $this->_limit = (int) $number;
+ $this->_limit = $number;
return $this;
}

0 comments on commit e303e81

Please sign in to comment.