Commit a6b2d856 authored by Jeremy Mikola's avatar Jeremy Mikola

PHPLIB-102: Implement UpdateResult::getUpsertedCount()

parent db628d93
...@@ -49,6 +49,19 @@ class UpdateResult ...@@ -49,6 +49,19 @@ class UpdateResult
return $this->writeResult->getModifiedCount(); return $this->writeResult->getModifiedCount();
} }
/**
* Return the number of documents that were upserted.
*
* This value is undefined if the write was not acknowledged.
*
* @see UpdateResult::isAcknowledged()
* @return integer
*/
public function getUpsertedCount()
{
return $this->writeResult->getUpsertedCount();
}
/** /**
* Return the ID of the document inserted by an upsert operation. * Return the ID of the document inserted by an upsert operation.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment