Phalcon\Db\Adapter\MongoDB\Collection::updateOne PHP Method

updateOne() public method

Updates at most one document matching the filter.
See also: UpdateOne::__construct() for supported options
See also: http://docs.mongodb.org/manual/reference/command/update/
public updateOne ( array | object $filter, array | object $update, array $options = [] ) : UpdateResult
$filter array | object Query by which to filter documents
$update array | object Update to apply to the matched document
$options array Command options
return UpdateResult
    public function updateOne($filter, $update, array $options = [])
    {
        if (!isset($options['writeConcern'])) {
            $options['writeConcern'] = $this->writeConcern;
        }
        $operation = new UpdateOne($this->databaseName, $this->collectionName, $filter, $update, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }