Phalcon\Db\Adapter\MongoDB\Collection::replaceOne PHP 메소드

replaceOne() 공개 메소드

Replaces at most one document matching the filter.
또한 보기: ReplaceOne::__construct() for supported options
또한 보기: http://docs.mongodb.org/manual/reference/command/update/
public replaceOne ( array | object $filter, array | object $replacement, array $options = [] ) : UpdateResult
$filter array | object Query by which to filter documents
$replacement array | object Replacement document
$options array Command options
리턴 UpdateResult
    public function replaceOne($filter, $replacement, array $options = [])
    {
        if (!isset($options['writeConcern'])) {
            $options['writeConcern'] = $this->writeConcern;
        }
        $operation = new ReplaceOne($this->databaseName, $this->collectionName, $filter, $replacement, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }