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

Method updateRefresh

lib/Db/ReportMapper.php:270–280  ·  view source on GitHub ↗

* update report refresh interval * @param $id * @param $refresh * @return bool * @throws Exception */

($id, $refresh)

Source from the content-addressed store, hash-verified

268 * @throws Exception
269 */
270 public function updateRefresh($id, $refresh)
271 {
272 $sql = $this->db->getQueryBuilder();
273 $sql->update(self::TABLE_NAME)
274 ->set('refresh', $sql->createNamedParameter($refresh))
275 ->set('version', $sql->createFunction('COALESCE(version, 0) + 1'))
276 ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))
277 ->andWhere($sql->expr()->eq('id', $sql->createNamedParameter($id)));
278 $sql->executeStatement();
279 return true;
280 }
281
282 /**
283 * update report group assignment (from drag & drop)

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
eqMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected