* get the newest timestamp of the data of a dataset * @param $datasetId * @return int * @throws Exception */
($datasetId)
| 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 |
no outgoing calls
no test coverage detected