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

Method getLastUpdate

lib/Db/DatasetMapper.php:215–220  ·  view source on GitHub ↗

* get the newest timestamp of the data of a dataset * @param $datasetId * @return int * @throws Exception */

($datasetId)

Source from the content-addressed store, hash-verified

213 * @throws Exception
214 */
215 public function getLastUpdate($datasetId): int {
216 $sql = $this->db->getQueryBuilder();
217 $sql->from('analytics_facts')->select($sql->func()->max('timestamp'))->where($sql->expr()
218 ->eq('dataset', $sql->createNamedParameter($datasetId)));
219 return (int)$sql->executeQuery()->fetchOne();
220 }
221
222 /**
223 * get the report owner

Callers 1

replaceTextVariablesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected