Add getUntweetedTweets method
This commit is contained in:
parent
b85a82e6d6
commit
2c5e1cf756
1 changed files with 11 additions and 14 deletions
|
@ -30,22 +30,19 @@ class TweetRepository extends ServiceEntityRepository
|
|||
|
||||
return collect($result)->first();
|
||||
}
|
||||
// /**
|
||||
// * @return Tweet[] Returns an array of Tweet objects
|
||||
// */
|
||||
/*
|
||||
public function findByExampleField($value)
|
||||
|
||||
|
||||
public function getUntweetedTweets(int $limit): Collection
|
||||
{
|
||||
return $this->createQueryBuilder('t')
|
||||
->andWhere('t.exampleField = :val')
|
||||
->setParameter('val', $value)
|
||||
->orderBy('t.id', 'ASC')
|
||||
->setMaxResults(10)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
return collect(
|
||||
$this->createQueryBuilder('t')
|
||||
->where('t.retweeted is NULL')
|
||||
->orderBy('t.created', 'asc')
|
||||
->setMaxResults($limit)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
public function findOneBySomeField($value): ?Tweet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue