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

Method increaseVersionByDataset

lib/Db/ReportMapper.php:442–450  ·  view source on GitHub ↗

* increase version for all reports of a dataset * @param int $datasetId * @return bool * @throws Exception */

(int $datasetId)

Source from the content-addressed store, hash-verified

440 * @throws Exception
441 */
442 public function increaseVersionByDataset(int $datasetId): bool
443 {
444 $sql = $this->db->getQueryBuilder();
445 $sql->update(self::TABLE_NAME)
446 ->set('version', $sql->createFunction('COALESCE(version, 0) + 1'))
447 ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId)));
448 $sql->executeStatement();
449 return true;
450 }
451
452 /**
453 * increase version for a report. used e.g. for threshold updates

Callers 2

addDataV2Method · 0.45
addDataV4Method · 0.45

Calls 2

setMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected