* @return list > * @throws Exception */
(string $table, string $uid)
| 120 | * @throws Exception |
| 121 | */ |
| 122 | private function fetchAllByUser(string $table, string $uid): array { |
| 123 | $sql = $this->db->getQueryBuilder(); |
| 124 | $sql->from($table) |
| 125 | ->select('*') |
| 126 | ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($uid))); |
| 127 | |
| 128 | $statement = $sql->executeQuery(); |
| 129 | $result = $statement->fetchAll(); |
| 130 | $statement->closeCursor(); |
| 131 | |
| 132 | return is_array($result) ? $result : []; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * @param list<int> $ids |