Skip to content

Commit

Permalink
Add method to force counting the found rows
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyBJacobs committed Nov 27, 2016
1 parent 5e87e97 commit bf8bf6a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Query/FluentQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,19 @@ public function paginate( $page, $per_page ) {
return $this;
}

/**
* Calculate the total rows found.
*
* @since 2.0.0
*
* @return $this
*/
public function calc_found_rows() {
$this->calc_found_rows = true;

return $this;
}

/**
* Execute a callback over every row, chunking by a certain number.
*
Expand Down

0 comments on commit bf8bf6a

Please sign in to comment.