* increase version for a report. used e.g. for threshold updates * @param int $id * @return bool * @throws Exception */
(int $id)
| 467 | * @throws Exception |
| 468 | */ |
| 469 | public function increaseVersionByReport(int $id): bool |
| 470 | { |
| 471 | $sql = $this->db->getQueryBuilder(); |
| 472 | $sql->update(self::TABLE_NAME) |
| 473 | ->set('version', $sql->createFunction('COALESCE(version, 0) + 1')) |
| 474 | ->where($sql->expr()->eq('id', $sql->createNamedParameter($id))); |
| 475 | $sql->executeStatement(); |
| 476 | return true; |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * truncates fiels do DB-field size |