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

Method update

lib/Db/DatasetMapper.php:197–210  ·  view source on GitHub ↗

* update dataset * @param $id * @param $namefl * @param $dimension1 * @param $dimension2 * @param $value * @param $subheader * @param $aiIndex * @return bool * @throws Exception */

($id, $name, $subheader, $dimension1, $dimension2, $value, $aiIndex)

Source from the content-addressed store, hash-verified

195 * @throws Exception
196 */
197 public function update($id, $name, $subheader, $dimension1, $dimension2, $value, $aiIndex): bool {
198 $name = $this->truncate($name, 64);
199 $sql = $this->db->getQueryBuilder();
200 $sql->update(self::TABLE_NAME)->set('name', $sql->createNamedParameter($name))
201 ->set('subheader', $sql->createNamedParameter($subheader))
202 ->set('dimension1', $sql->createNamedParameter($dimension1))
203 ->set('dimension2', $sql->createNamedParameter($dimension2))
204 ->set('value', $sql->createNamedParameter($value))
205 ->set('ai_index', $sql->createNamedParameter($aiIndex))
206 ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))->andWhere($sql->expr()
207 ->eq('id', $sql->createNamedParameter($id)));
208 $sql->executeStatement();
209 return true;
210 }
211
212
213 public function createGroup(string $name, int $parent): int {

Callers 3

updateFlexibleSchemaMethod · 0.45
updateGroupMethod · 0.45
updateNameMethod · 0.45

Calls 3

truncateMethod · 0.95
setMethod · 0.80
eqMethod · 0.80

Tested by

no test coverage detected