public moveToCollection ( type $targetCollectionName, type $targetDatabaseName = null ) | ||
$targetCollectionName | type | |
$targetDatabaseName | type | Target database name. If not specified - use current |
public function moveToCollection($targetCollectionName, $targetDatabaseName = null)
{
// copy to target
$this->copyToCollection($targetCollectionName, $targetDatabaseName);
// remove from source
$this->collection->deleteDocuments($this->expression);
}