Skip to content

Commit de88d52

Browse files
committed
fixup! chunking in statements
Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent e73a935 commit de88d52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Db/MessageMapper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,7 @@ public function findRelatedData(array $messages, string $userId): array {
950950

951951
/**
952952
* @param Mailbox $mailbox
953-
* @param int $highest
954-
*
953+
* @param array $ids
955954
* @return int[]
956955
*/
957956
public function findNewIds(Mailbox $mailbox, array $ids): array {
@@ -974,7 +973,7 @@ public function findNewIds(Mailbox $mailbox, array $ids): array {
974973

975974
return array_flat_map(function (array $chunk) use ($qb, $subSelect) {
976975
$qb->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY);
977-
$select = $qb->where(
976+
$select = $qb->andWhere(
978977
$qb->expr()->gt('uid', $qb->createFunction('(' . $subSelect->getSQL() . ')'), IQueryBuilder::PARAM_INT)
979978
);
980979
return $this->findIds($select);

0 commit comments

Comments
 (0)