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 collect($result)->first();
|
||||||
}
|
}
|
||||||
// /**
|
|
||||||
// * @return Tweet[] Returns an array of Tweet objects
|
|
||||||
// */
|
public function getUntweetedTweets(int $limit): Collection
|
||||||
/*
|
|
||||||
public function findByExampleField($value)
|
|
||||||
{
|
{
|
||||||
return $this->createQueryBuilder('t')
|
return collect(
|
||||||
->andWhere('t.exampleField = :val')
|
$this->createQueryBuilder('t')
|
||||||
->setParameter('val', $value)
|
->where('t.retweeted is NULL')
|
||||||
->orderBy('t.id', 'ASC')
|
->orderBy('t.created', 'asc')
|
||||||
->setMaxResults(10)
|
->setMaxResults($limit)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
;
|
);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public function findOneBySomeField($value): ?Tweet
|
public function findOneBySomeField($value): ?Tweet
|
||||||
|
|
|
||||||
Reference in a new issue