PHP Class Phalcon\Db\Adapter\MongoDB\Operation\FindOneAndDelete

See also: MongoDB\Collection::findOneAndDelete()
See also: http://docs.mongodb.org/manual/reference/command/findAndModify/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
ファイルを表示 Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__construct ( string $databaseName, string $collectionName, array | object $filter, array $options = [] ) Constructs a findAndModify command for deleting a document.
execute ( MongoDB\Driver\Server $server ) : object | null Execute the operation.

Method Details

__construct() public method

Supported options: * maxTimeMS (integer): The maximum amount of time to allow the query to run. * projection (document): Limits the fields to return for the matching document. * sort (document): Determines which document the operation modifies if the query selects multiple documents. * writeConcern (MongoDB\Driver\WriteConcern): Write concern. This option is only supported for server versions >= 3.2.
public __construct ( string $databaseName, string $collectionName, array | object $filter, array $options = [] )
$databaseName string Database name
$collectionName string Collection name
$filter array | object Query by which to filter documents
$options array Command options

execute() public method

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : object | null
$server MongoDB\Driver\Server
return object | null