Skip to content

Commit 22f5683

Browse files
authored
Merge pull request #2608 from nuernbergerA/remove-unnecessary-wrap
[9.x] Remove unnecessary wrap to avoid performance issues
2 parents 53b3f85 + 8ff25c3 commit 22f5683

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/QueryDataTable.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,7 @@ protected function filteredCount()
210210
*/
211211
public function count()
212212
{
213-
$builder = $this->prepareCountQuery();
214-
$table = $this->connection->raw('(' . $builder->toSql() . ') count_row_table');
215-
216-
return $this->connection->table($table)
217-
->setBindings($builder->getBindings())
218-
->count();
213+
return $this->prepareCountQuery()->count();
219214
}
220215

221216
/**

0 commit comments

Comments
 (0)