* @return list > * @throws Exception */
(string $table, string $uid)
| 131 | * @throws Exception |
| 132 | */ |
| 133 | private function fetchAllByUser(string $table, string $uid): array { |
| 134 | $sql = $this->db->getQueryBuilder(); |
| 135 | $sql->from($table) |
| 136 | ->select('*') |
| 137 | ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($uid))); |
| 138 | |
| 139 | $statement = $sql->executeQuery(); |
| 140 | $result = $statement->fetchAll(); |
| 141 | $statement->closeCursor(); |
| 142 | |
| 143 | return is_array($result) ? $result : []; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * @param list<int> $ids |