mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: move DQL in repositories
This commit is contained in:
@@ -16,6 +16,15 @@ class WatchListRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, WatchList::class);
|
||||
}
|
||||
|
||||
public function getTrackedDomainCount()
|
||||
{
|
||||
return $this->createQueryBuilder('w')
|
||||
->select('COUNT(DISTINCT d.ldhName)')
|
||||
->join('w.domains', 'd')
|
||||
->where('d.deleted = FALSE')
|
||||
->getQuery()->getSingleScalarResult();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return WatchList[] Returns an array of WatchList objects
|
||||
// */
|
||||
|
||||
Reference in New Issue
Block a user