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

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

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

Метод Описание
__construct ( MongoDB\Driver\WriteResult $writeResult, mixed $insertedId ) Constructor.
getInsertedCount ( ) : integer Return the number of documents that were inserted.
getInsertedId ( ) : mixed Return the inserted document's ID.
isAcknowledged ( ) : boolean Return whether this insert was acknowledged by the server.

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

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

Constructor.
public __construct ( MongoDB\Driver\WriteResult $writeResult, mixed $insertedId )
$writeResult MongoDB\Driver\WriteResult
$insertedId mixed

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

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

getInsertedId() публичный метод

If the document already an ID prior to insertion (i.e. the driver did not need to generate an ID), this will contain its "_id". Any driver-generated ID will be an MongoDB\BSON\ObjectID instance.
public getInsertedId ( ) : mixed
Результат mixed

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

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