@@ 361-374 (lines=14) @@ | ||
358 | * @param array $options |
|
359 | * @return \MongoDB\UpdateResult |
|
360 | */ |
|
361 | public function updateOne(array $where = [], array $modifications = [], array $options = []) |
|
362 | { |
|
363 | ||
364 | $this->logger->info( |
|
365 | 'Update one ', |
|
366 | [ |
|
367 | 'where' => $where, |
|
368 | 'update' => $modifications, |
|
369 | 'col' => $this->name, |
|
370 | ] |
|
371 | ); |
|
372 | ||
373 | return $this->collection->updateOne($where, $modifications, $options); |
|
374 | } |
|
375 | ||
376 | ||
377 | /** |
|
@@ 385-398 (lines=14) @@ | ||
382 | * @param array $options |
|
383 | * @return \MongoDB\UpdateResult |
|
384 | */ |
|
385 | public function updateMany(array $where = [], array $modifications = [], array $options = []) |
|
386 | { |
|
387 | ||
388 | $this->logger->info( |
|
389 | 'Update many ', |
|
390 | [ |
|
391 | 'where' => $where, |
|
392 | 'update' => $modifications, |
|
393 | 'col' => $this->name, |
|
394 | ] |
|
395 | ); |
|
396 | ||
397 | return $this->collection->updateMany($where, $modifications, $options); |
|
398 | } |
|
399 | ||
400 | /** |
|
401 | * Update one documents (the whole document) |
|
@@ 408-421 (lines=14) @@ | ||
405 | * @param array $options |
|
406 | * @return \MongoDB\UpdateResult |
|
407 | */ |
|
408 | public function replaceOne(array $where = [], array $modifications = [], array $options = []) |
|
409 | { |
|
410 | ||
411 | $this->logger->info( |
|
412 | 'Replace one ', |
|
413 | [ |
|
414 | 'where' => $where, |
|
415 | 'update' => $modifications, |
|
416 | 'col' => $this->name, |
|
417 | ] |
|
418 | ); |
|
419 | ||
420 | return $this->collection->replaceOne($where, $modifications, $options); |
|
421 | } |
|
422 | ||
423 | ||
424 | /** |