Skip to content

Commit

Permalink
Orm/ItemReservation: Use QueryBuilder properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Jan 7, 2025
1 parent 0f01785 commit c7ed4db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Model/Orm/ItemReservation/ItemReservationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/
final class ItemReservationMapper extends BaseMapper {
public function getStats(): Result {
$query = $this->builder()->select('name')->addSelect('COUNT(*) AS cnt')->groupBy('name')->getQuerySql();
$builder = $this->builder()->select('name')->addSelect('COUNT(*) AS cnt')->groupBy('name');

return $this->connection->queryArgs([$query, $this->getTableName()]);
return $this->connection->queryByQueryBuilder($builder);
}
}

0 comments on commit c7ed4db

Please sign in to comment.