| @@ 327-337 (lines=11) @@ | ||
| 324 | * @param string $id |
|
| 325 | * @param array $row |
|
| 326 | */ |
|
| 327 | protected function insert(string $id, array $row) |
|
| 328 | { |
|
| 329 | $table = $this->getTable(); |
|
| 330 | ||
| 331 | $this->logger->info( |
|
| 332 | 'model: insert row into table {table} with id {id}', |
|
| 333 | ['table' => $table, 'id' => $id] |
|
| 334 | ); |
|
| 335 | ||
| 336 | $this->connection->insert($table, $row); |
|
| 337 | } |
|
| 338 | ||
| 339 | /** |
|
| 340 | * @param string $id |
|
| @@ 343-353 (lines=11) @@ | ||
| 340 | * @param string $id |
|
| 341 | * @param array $row |
|
| 342 | */ |
|
| 343 | protected function update(string $id, array $row) |
|
| 344 | { |
|
| 345 | $table = $this->getTable(); |
|
| 346 | ||
| 347 | $this->logger->info( |
|
| 348 | 'model: update row into table {table} with id {id}', |
|
| 349 | ['table' => $table, 'id' => $id] |
|
| 350 | ); |
|
| 351 | ||
| 352 | $this->connection->update($table, $row, ['id' => $id]); |
|
| 353 | } |
|
| 354 | ||
| 355 | /** |
|
| 356 | * @param ModelInterface[]|array $toRemoveRelatedModels |
|