Documentation

DeleteResult
in package

Result class for a delete operation.

Table of Contents

$isAcknowledged  : bool
$writeResult  : WriteResult
__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
Return values
mixed

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
BadMethodCallException

is 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

Search results