| @@ 273-283 (lines=11) @@ | ||
| 270 | * @param string $id |
|
| 271 | * @param array $row |
|
| 272 | */ |
|
| 273 | protected function insert(string $id, array $row) |
|
| 274 | { |
|
| 275 | $table = $this->getTable(); |
|
| 276 | ||
| 277 | $this->logger->info( |
|
| 278 | 'model: insert row into table {table} with id {id}', |
|
| 279 | ['table' => $table, 'id' => $id] |
|
| 280 | ); |
|
| 281 | ||
| 282 | $this->connection->insert($table, $row); |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * @param string $id |
|
| @@ 289-299 (lines=11) @@ | ||
| 286 | * @param string $id |
|
| 287 | * @param array $row |
|
| 288 | */ |
|
| 289 | protected function update(string $id, array $row) |
|
| 290 | { |
|
| 291 | $table = $this->getTable(); |
|
| 292 | ||
| 293 | $this->logger->info( |
|
| 294 | 'model: update row into table {table} with id {id}', |
|
| 295 | ['table' => $table, 'id' => $id] |
|
| 296 | ); |
|
| 297 | ||
| 298 | $this->connection->update($table, $row, ['id' => $id]); |
|
| 299 | } |
|
| 300 | ||
| 301 | /** |
|
| 302 | * @param ModelReferenceInterface $reference |
|