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

Method updateById

lib/UserMigration/AnalyticsMigrator.php:562–576  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

560 * @throws Exception
561 */
562 private function updateById(string $table, int $id, array $values): void {
563 if ($values === []) {
564 return;
565 }
566
567 $sql = $this->db->getQueryBuilder();
568 $sql->update($table);
569
570 foreach ($values as $column => $value) {
571 $sql->set($column, $sql->createNamedParameter($value));
572 }
573
574 $sql->where($sql->expr()->eq('id', $sql->createNamedParameter($id)));
575 $sql->executeStatement();
576 }
577
578 /**
579 * @param array<string,mixed> $values

Callers 4

importDatasetsMethod · 0.95
importReportsMethod · 0.95
importFlexibleStorageMethod · 0.95
importPanoramasMethod · 0.95

Calls 3

setMethod · 0.80
eqMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected