Documentation

DeleteResult
in package

Result class for a delete operation.

Table of Contents

Properties

$writeResult  : WriteResult

Methods

__construct()  : mixed
getDeletedCount()  : int
Return the number of documents that were deleted.
isAcknowledged()  : bool
Return whether this delete was acknowledged by the server.

Properties

Methods

__construct()

public __construct(WriteResult $writeResult) : mixed
Parameters
$writeResult : WriteResult

getDeletedCount()

Return the number of documents that were deleted.

public getDeletedCount() : int

This method should only be called if the write was acknowledged.

Tags
see
DeleteResult::isAcknowledged()
throws
LogicException

if the write result is unacknowledged

Return values
int

isAcknowledged()

Return whether this delete was acknowledged by the server.

public isAcknowledged() : bool

If the delete was not acknowledged, other fields from the WriteResult (e.g. deletedCount) will be undefined.

Return values
bool

        
On this page

Search results