mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(snowflake): cast lastId to int
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
70b84a7b29
commit
eef7422957
2 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue