diff --git a/lib/Db/LoginAddressAggregatedMapper.php b/lib/Db/LoginAddressAggregatedMapper.php index a54f4322..bb74f511 100644 --- a/lib/Db/LoginAddressAggregatedMapper.php +++ b/lib/Db/LoginAddressAggregatedMapper.php @@ -46,7 +46,7 @@ public function hasSufficientIpV4Data(int $start): bool { $qb = $this->db->getQueryBuilder(); $query = $qb - ->select($qb->createFunction('COUNT(*)')) + ->select($qb->func()->count('*')) ->from($this->getTableName()) ->where($qb->expr()->andX( $qb->expr()->like('ip', $qb->createNamedParameter('_%._%._%._%')), @@ -103,8 +103,7 @@ public function findHistoricAndRecentIpv4(int $threshold, int $maxAge = 0): arra public function hasSufficientIpV6Data(int $start) { $qb = $this->db->getQueryBuilder(); - $query = $qb - ->select($qb->createFunction('COUNT(*)')) + $query = $qb->select($qb->func()->count('*')) ->from($this->getTableName()) ->where($qb->expr()->andX( $qb->expr()->notLike('ip', $qb->createNamedParameter('_%._%._%._%')), @@ -121,7 +120,7 @@ public function hasSufficientIpV6Data(int $start) { public function getCount(): int { $qb = $this->db->getQueryBuilder(); - $qb->select($qb->createFunction('COUNT(*)')) + $qb->select($qb->func()->count('*')) ->from($this->getTableName()); $result = $qb->executeQuery(); $cnt = $result->fetchColumn(); @@ -133,7 +132,7 @@ public function getCount(): int { public function getTotalCount(): int { $qb = $this->db->getQueryBuilder(); - $qb->select($qb->createFunction('SUM(seen)')) + $qb->select($qb->func()->sum('seen')) ->from($this->getTableName()); $result = $qb->executeQuery(); $cnt = $result->fetchColumn();