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

Method increaseVersionByDataset

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

444 * @throws Exception
445 */
446 public function increaseVersionByDataset(int $datasetId): bool
447 {
448 $sql = $this->db->getQueryBuilder();
449 $sql->update(self::TABLE_NAME)
450 ->set('version', $sql->createFunction('COALESCE(version, 0) + 1'))
451 ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId)));
452 $sql->executeStatement();
453 return true;
454 }
455
456 /**
457 * 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