Think/Db/Driver/Mongo.php
public function update($data, $options)
    {
        if (isset($options['table'])) {
            $this->switchCollection($options['table']);
        }
        $this->executeTimes++;
        $this->model = $options['model'];
        $query = $this->parseWhere(isset($options['where']) ? $options['where'] : []);
        $set = $this->parseSet($data);
        if ($this->config['debug']) {
            $this->queryStr = $this->_dbName.'.'.$this->_collectionName.'.update(';
            $this->queryStr .= $query ? json_encode($query) : '{}';
            $this->queryStr .= ','.json_encode($set).')';
        }
        try {
            $this->debug(true);
            if (isset($options['limit']) && $options['limit'] == 1) {
                $multiple = ['multiple' => false];
            } else {
                $multiple = ['multiple' => true];
            }
            $result = $this->_collection->update($query, $set, $multiple);
            $this->debug(false);

            return $result;
        } catch (\MongoCursorException $e) {
            E($e->getMessage());
        }
    }
public function update($data, $options)
    {
        if (isset($options['table'])) {
            $this->switchCollection($options['table']);
        }
        $this->executeTimes++;
        $this->model = $options['model'];
        $query = $this->parseWhere(isset($options['where']) ? $options['where'] : []);
        $set = $this->parseSet($data);
        if ($this->config['debug']) {
            $this->queryStr = $this->_dbName.'.'.$this->_collectionName.'.update(';
            $this->queryStr .= $query ? json_encode($query) : '{}';
            $this->queryStr .= ','.json_encode($set).')';
        }
        try {
            $this->debug(true);
            if (isset($options['limit']) && $options['limit'] == 1) {
                $multiple = ['multiple' => false];
            } else {
                $multiple = ['multiple' => true];
            }
            $result = $this->_collection->update($query, $set, $multiple);
            $this->debug(false);

            return $result;
        } catch (\MongoCursorException $e) {
            E($e->getMessage());
        }
    }
更新记录
@param mixed $data 数据
@param array $options 表达式
@return bool