PHP Класс Phalcon\Db\Adapter\MongoDB\InsertManyResult

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( MongoDB\Driver\WriteResult $writeResult, array $insertedIds ) Constructor.
getInsertedCount ( ) : integer Return the number of documents that were inserted.
getInsertedIds ( ) : mixed[] Return a map of the inserted documents' IDs.
isAcknowledged ( ) : boolean Return whether this insert result was acknowledged by the server.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( MongoDB\Driver\WriteResult $writeResult, array $insertedIds )
$writeResult MongoDB\Driver\WriteResult
$insertedIds array

getInsertedCount() публичный Метод

This method should only be called if the write was acknowledged.
См. также: InsertManyResult::isAcknowledged()
public getInsertedCount ( ) : integer
Результат integer

getInsertedIds() публичный Метод

The index of each ID in the map corresponds to the document's position in the bulk operation. If the document had an ID prior to insertion (i.e. the driver did not generate an ID), this will contain its "_id" field value. Any driver-generated ID will be an MongoDB\BSON\ObjectID instance.
public getInsertedIds ( ) : mixed[]
Результат mixed[]

isAcknowledged() публичный Метод

If the insert was not acknowledged, other fields from the WriteResult (e.g. insertedCount) will be undefined.
public isAcknowledged ( ) : boolean
Результат boolean