| @@ 296-306 (lines=11) @@ | ||
| 293 | * @param string $id |
|
| 294 | * @param array $row |
|
| 295 | */ |
|
| 296 | protected function insert(string $id, array $row) |
|
| 297 | { |
|
| 298 | $table = $this->getTable(); |
|
| 299 | ||
| 300 | $this->logger->info( |
|
| 301 | 'model: insert row into table {table} with id {id}', |
|
| 302 | ['table' => $table, 'id' => $id] |
|
| 303 | ); |
|
| 304 | ||
| 305 | $this->connection->insert($table, $row); |
|
| 306 | } |
|
| 307 | ||
| 308 | /** |
|
| 309 | * @param string $id |
|
| @@ 312-322 (lines=11) @@ | ||
| 309 | * @param string $id |
|
| 310 | * @param array $row |
|
| 311 | */ |
|
| 312 | protected function update(string $id, array $row) |
|
| 313 | { |
|
| 314 | $table = $this->getTable(); |
|
| 315 | ||
| 316 | $this->logger->info( |
|
| 317 | 'model: update row from table {table} with id {id}', |
|
| 318 | ['table' => $table, 'id' => $id] |
|
| 319 | ); |
|
| 320 | ||
| 321 | $this->connection->update($table, $row, ['id' => $id]); |
|
| 322 | } |
|
| 323 | ||
| 324 | /** |
|
| 325 | * @param ModelReferenceInterface $reference |
|