PHP 클래스 Phalcon\Db\Adapter\MongoDB\InsertOneResult

파일 보기 프로젝트 열기: phalcon/incubator

공개 메소드들

메소드 설명
__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