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