PHP 클래스 Phalcon\Db\Adapter\MongoDB\Operation\Update

This class is used internally by the ReplaceOne, UpdateMany, and UpdateOne operation classes.
또한 보기: http://docs.mongodb.org/manual/reference/command/update/
상속: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
파일 보기 프로젝트 열기: phalcon/incubator

공개 메소드들

메소드 설명
__construct ( string $databaseName, string $collectionName, array | object $filter, array | object $update, array $options = [] ) Constructs a update command.
execute ( MongoDB\Driver\Server $server ) : UpdateResult Execute the operation.

메소드 상세

__construct() 공개 메소드

Supported options: * bypassDocumentValidation (boolean): If true, allows the write to opt out of document level validation. * multi (boolean): When true, updates all documents matching the query. This option cannot be true if the $update argument is a replacement document (i.e. contains no update operators). The default is false. * upsert (boolean): When true, a new document is created if no document matches the query. The default is false. * writeConcern (MongoDB\Driver\WriteConcern): Write concern.
public __construct ( string $databaseName, string $collectionName, array | object $filter, array | object $update, array $options = [] )
$databaseName string Database name
$collectionName string Collection name
$filter array | object Query by which to delete documents
$update array | object Update to apply to the matched document(s) or a replacement document
$options array Command options

execute() 공개 메소드

Execute the operation.
또한 보기: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : UpdateResult
$server MongoDB\Driver\Server
리턴 Phalcon\Db\Adapter\MongoDB\UpdateResult