PHP Класс Phalcon\Db\Adapter\MongoDB\Operation\FindAndModify

This class is used internally by the FindOneAndDelete, FindOneAndReplace, and FindOneAndUpdate operation classes.
См. также: http://docs.mongodb.org/manual/reference/command/findAndModify/
Наследование: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Показать файл Открыть проект

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

Метод Описание
__construct ( string $databaseName, string $collectionName, array $options ) Constructs a findAndModify command.
execute ( MongoDB\Driver\Server $server ) : object | null Execute the operation.

Приватные методы

Метод Описание
createCommand ( MongoDB\Driver\Server $server ) : MongoDB\Driver\Command Create the findAndModify command.

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

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

Supported options: * bypassDocumentValidation (boolean): If true, allows the write to opt out of document level validation. * fields (document): Limits the fields to return for the matching document. * maxTimeMS (integer): The maximum amount of time to allow the query to run. * new (boolean): When true, returns the modified document rather than the original. This option is ignored for remove operations. The The default is false. * query (document): Query by which to filter documents. * remove (boolean): When true, removes the matched document. This option cannot be true if the update option is set. The default is false. * sort (document): Determines which document the operation modifies if the query selects multiple documents. * update (document): Update or replacement to apply to the matched document. This option cannot be set if the remove option is true. * upsert (boolean): When true, a new document is created if no document matches the query. This option is ignored for remove operations. The default is false. * writeConcern (MongoDB\Driver\WriteConcern): Write concern. This option is only supported for server versions >= 3.2.
public __construct ( string $databaseName, string $collectionName, array $options )
$databaseName string Database name
$collectionName string Collection name
$options array Command options

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

Execute the operation.
См. также: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : object | null
$server MongoDB\Driver\Server
Результат object | null