| @@ 349-362 (lines=14) @@ | ||
| 346 | * @param array $options |
|
| 347 | * @return \MongoDB\UpdateResult |
|
| 348 | */ |
|
| 349 | public function updateOne(array $where = [], array $modifications = [], array $options = []) |
|
| 350 | { |
|
| 351 | ||
| 352 | $this->logger->info( |
|
| 353 | 'Update one ', |
|
| 354 | [ |
|
| 355 | 'where' => $where, |
|
| 356 | 'update' => $modifications, |
|
| 357 | 'col' => $this->name, |
|
| 358 | ] |
|
| 359 | ); |
|
| 360 | ||
| 361 | return $this->collection->updateOne($where, $modifications, $options); |
|
| 362 | } |
|
| 363 | ||
| 364 | ||
| 365 | /** |
|
| @@ 373-386 (lines=14) @@ | ||
| 370 | * @param array $options |
|
| 371 | * @return \MongoDB\UpdateResult |
|
| 372 | */ |
|
| 373 | public function updateMany(array $where = [], array $modifications = [], array $options = []) |
|
| 374 | { |
|
| 375 | ||
| 376 | $this->logger->info( |
|
| 377 | 'Update many ', |
|
| 378 | [ |
|
| 379 | 'where' => $where, |
|
| 380 | 'update' => $modifications, |
|
| 381 | 'col' => $this->name, |
|
| 382 | ] |
|
| 383 | ); |
|
| 384 | ||
| 385 | return $this->collection->updateMany($where, $modifications, $options); |
|
| 386 | } |
|
| 387 | ||
| 388 | /** |
|
| 389 | * Update one documents (the whole document) |
|
| @@ 396-409 (lines=14) @@ | ||
| 393 | * @param array $options |
|
| 394 | * @return \MongoDB\UpdateResult |
|
| 395 | */ |
|
| 396 | public function replaceOne(array $where = [], array $modifications = [], array $options = []) |
|
| 397 | { |
|
| 398 | ||
| 399 | $this->logger->info( |
|
| 400 | 'Replace one ', |
|
| 401 | [ |
|
| 402 | 'where' => $where, |
|
| 403 | 'update' => $modifications, |
|
| 404 | 'col' => $this->name, |
|
| 405 | ] |
|
| 406 | ); |
|
| 407 | ||
| 408 | return $this->collection->replaceOne($where, $modifications, $options); |
|
| 409 | } |
|
| 410 | ||
| 411 | ||
| 412 | /** |
|