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

Method increaseVersionByReport

lib/Db/ReportMapper.php:469–477  ·  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

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

Callers 3

createMethod · 0.80
deleteMethod · 0.80
reorderMethod · 0.80

Calls 3

setMethod · 0.80
eqMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected