perf(cards): fetch all cards at once

Instead of one by one

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
This commit is contained in:
Carl Schwan
2025-08-13 14:50:54 +02:00
parent 0ed8b21b3c
commit a3fa72341d
5 changed files with 58 additions and 21 deletions

View File

@@ -77,12 +77,10 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Stack[]
* @throws \OCP\DB\Exception
*/
public function findAll($boardId, $limit = null, $offset = null): array {
public function findAll($boardId, ?int $limit = null, ?int $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())