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