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

Method updateById

lib/UserMigration/AnalyticsMigrator.php:419–433  ·  view source on GitHub ↗

* @param array $values * @throws Exception */

(string $table, int $id, array $values)

Source from the content-addressed store, hash-verified

417 * @throws Exception
418 */
419 private function updateById(string $table, int $id, array $values): void {
420 if ($values === []) {
421 return;
422 }
423
424 $sql = $this->db->getQueryBuilder();
425 $sql->update($table);
426
427 foreach ($values as $column => $value) {
428 $sql->set($column, $sql->createNamedParameter($value));
429 }
430
431 $sql->where($sql->expr()->eq('id', $sql->createNamedParameter($id)));
432 $sql->executeStatement();
433 }
434
435 /**
436 * @param array<string,mixed> $values

Callers 3

importDatasetsMethod · 0.95
importReportsMethod · 0.95
importPanoramasMethod · 0.95

Calls 2

setMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected