Beispiel #1
0
 /**
  * @param $dbName
  * @param $collectionName
  * @param $newCollectionName
  * @return bool
  */
 public function renameCollection($dbName, $collectionName, $newCollectionName)
 {
     $dbResponse = DB::getMongoClient()->admin->command(['renameCollection' => "{$dbName}.{$collectionName}", 'to' => "{$dbName}.{$newCollectionName}"]);
     return $this->checkResult($dbResponse);
 }