* increase version for all reports of a dataset * @param int $datasetId * @return bool * @throws Exception */
(int $datasetId)
| 444 | * @throws Exception |
| 445 | */ |
| 446 | public function increaseVersionByDataset(int $datasetId): bool |
| 447 | { |
| 448 | $sql = $this->db->getQueryBuilder(); |
| 449 | $sql->update(self::TABLE_NAME) |
| 450 | ->set('version', $sql->createFunction('COALESCE(version, 0) + 1')) |
| 451 | ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId))); |
| 452 | $sql->executeStatement(); |
| 453 | return true; |
| 454 | } |
| 455 | |
| 456 | /** |
| 457 | * increase version for a report. used e.g. for threshold updates |