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

Method increaseVersionByDataset

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

451 * @throws Exception
452 */
453 public function increaseVersionByDataset(int $datasetId): bool
454 {
455 $sql = $this->db->getQueryBuilder();
456 $sql->update(self::TABLE_NAME)
457 ->set('version', $sql->createFunction('COALESCE(version, 0) + 1'))
458 ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId)));
459 $sql->executeStatement();
460 return true;
461 }
462
463 /**
464 * increase version for a report. used e.g. for threshold updates

Callers 2

addDataV2Method · 0.45
addDataV4Method · 0.45

Calls 3

setMethod · 0.80
eqMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected