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

Method increaseVersionByReport

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

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

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