MCPcopy Create free account
hub / github.com/Rello/analytics / increaseVersionByReport

Method increaseVersionByReport

lib/Db/ReportMapper.php:462–470  ·  view source on GitHub ↗

* increase version for a report. used e.g. for threshold updates * @param int $id * @return bool * @throws Exception */

(int $id)

Source from the content-addressed store, hash-verified

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

Callers 3

createMethod · 0.80
deleteMethod · 0.80
reorderMethod · 0.80

Calls 2

setMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected