fix(snowflake): cast lastId to int

Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
Anna Larch 2026-02-09 18:30:42 +01:00 committed by backportbot[bot]
parent 70b84a7b29
commit eef7422957
2 changed files with 3 additions and 3 deletions

View file

@ -204,10 +204,10 @@ class PreviewMapper extends QBMapper {
/**
* @return \Generator<Preview>
*/
public function getPreviews(int $lastId, int $limit = 1000): \Generator {
public function getPreviews(string $lastId, int $limit = 1000): \Generator {
$qb = $this->db->getQueryBuilder();
$this->joinLocation($qb)
->where($qb->expr()->gt('p.id', $qb->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
->where($qb->expr()->gt('p.id', $qb->createNamedParameter($lastId)))
->setMaxResults($limit);
return $this->yieldEntities($qb);

View file

@ -110,7 +110,7 @@ class PreviewService {
* @throws Exception
*/
public function deleteAll(): void {
$lastId = 0;
$lastId = '0';
while (true) {
$previews = $this->previewMapper->getPreviews($lastId, 1000);
$i = 0;