Updates the rows in this queryset
161332
def update(self, **values):
        
        if not values:
            return

        nulled_columns = set()
        us = UpdateStatement(self.column_family_name, where=self._where, ttl=self._ttl,
                             timestamp=self._timestamp, transactions=self._transaction)
        for name, val in values.items():
            col_name, col_op = self._parse_filter_arg(name)
            col = self.model._columns.get(col_name)
            # check for nonexistant columns
            if col is None:
                raise ValidationError("{}.{} has no column named: {}".format(self.__module__, self.model.__name__, col_name))
            # check for primary key update attempts
            if col.is_primary_key:
                raise ValidationError("Cannot apply update to primary key '{}' for {}.{}".format(col_name, self.__module__, self.model.__name__))

            # we should not provide default values in this use case.
            val = col.validate(val)
            
            if val is None:
                nulled_columns.add(col_name)
                continue

            # add the update statements
            if isinstance(col, Counter):
                # TODO: implement counter updates
                raise NotImplementedError
            elif isinstance(col, (List, Set, Map)):
                if isinstance(col, List):
                    klass = ListUpdateClause
                elif isinstance(col, Set):
                    klass = SetUpdateClause
                elif isinstance(col, Map):
                    klass = MapUpdateClause
                else:
                    raise RuntimeError
                us.add_assignment_clause(klass(col_name, col.to_database(val), operation=col_op))
            else:
                us.add_assignment_clause(AssignmentClause(
                    col_name, col.to_database(val)))

        if us.assignments:
            self._execute(us)

        if nulled_columns:
            ds = DeleteStatement(self.column_family_name, fields=nulled_columns, where=self._where)
            self._execute(ds)
888297
async def update(self, db=None, data=None):
        '''
        
        '''
        db = db or self.db
        if data:  # update model explicitely with a new data structure
            # merge the current model's data with the new data
            self.import_data(data)
            # prepare data for database update
            data = self.prepare_data()
            # data = {x: ndata[x] for x in ndata if x in data or x == self.primary_key}
        else:
            data = self.export_data(native=True)

        if self.primary_key not in data or data[self.primary_key] is None:
            raise Exception('Missing object primary key')
        query = {self.primary_key: self.pk}
        for i in self.connection_retries():
            try:
                result = await db[self.get_collection_name()].find_one_and_replace(
                    filter=query,
                    replacement=data,
                    return_document=ReturnDocument.AFTER
                )
                if result:
                    updated_obj = self.create_model(result)
                    updated_obj._db = db
                    # emit post save
                    asyncio.ensure_future(post_save.send(
                        sender=self.__class__,
                        db=db,
                        instance=updated_obj,
                        created=False)
                    )
                    return updated_obj

                return None
            except ConnectionFailure as ex:
                exceed = await self.check_reconnect_tries_and_wait(i, 'update')
                if exceed:
                    raise ex
839476
def get_queryset(self):
        
        queryset = super(UpdateImageView, self).get_queryset()
        queryset = queryset.filter(user=self.user)
        return queryset
608838
def populate_records(self):
        

        self.object_list = self.get_valuesqueryset(self.object_list)
        super(ValuesDatatable, self).populate_records()
978787
def update_row(self, value):
		
		if not self.__history_mode:
			self.__current_row = value
		else:
			self.history().update(value, self.history().position())
295955
def queryMany(self, query, args):
		
		self.lastError = None
		self.affectedRows = None
		self.rowcount = None
		self.record = None
		cursor = None
		
		try:
			try:
				self._GetConnection()
				self.conn.query = query
				#Execute query and store results
				cursor = self.conn.getCursor()
				self.affectedRows = cursor.executemany(query, args)
				self.conn.updateCheckTime()
			except Exception, e:
				self.lastError = e
		finally:
			if cursor is not None:
				cursor.close()
			self._ReturnConnection()
			if self.lastError is not None:
				raise self.lastError
			else:
				return self.affectedRows
1056020
@Override
    public void refreshAllIndexes() throws QueryException {
        List<Index> indexes = listIndexes();

        IndexUpdater.updateAllIndexes(indexes, database, dbQueue);
    }
1241486
def update(self, iterable):
        """"""
        _lists = self._lists
        _maxes = self._maxes
        values = sorted(iterable)

        if _maxes:
            if len(values) * 4 >= self._len:
                values.extend(chain.from_iterable(_lists))
                values.sort()
                self._clear()
            else:
                _add = self.add
                for val in values:
                    _add(val)
                return

        _load = self._load
        _lists.extend(values[pos:(pos + _load)]
                      for pos in range(0, len(values), _load))
        _maxes.extend(sublist[-1] for sublist in _lists)
        self._len = len(values)
        del self._index[:]
1203467
def update(self, *args, **kwargs):
        

        dict.update(self, *args, **kwargs)
        self.__dict__.update(*args, **kwargs)
1284239
def update(self, _attributes=None, **attributes):
        
        if _attributes is not None:
            attributes.update(_attributes)

        instance = self.get_results()

        return instance.fill(attributes).save()
438130
def update(self, **kwargs):
        
        if self.condition is not None:
            self.result = self.do_(self.model.table.update().where(self.condition).values(**kwargs))
        else:
            self.result = self.do_(self.model.table.update().values(**kwargs))
        return self.result
628245
def update(self, **kwargs):
        
        for attr, val in kwargs.items():
            if attr in (list(self.__class__.__attributes__) + \
                        list(associations.associations_for(self.__class__))):
                setattr(self, attr, val)
567211
protected void update() {
        int sz = dataModel.getSize();
        int[] selected = helperList.getSelectedIndices();
        ArrayList sourceItems = new ArrayList(sz);
        ArrayList chosenItems = new ArrayList(selected.length);

        // Start with the source items filled from our data model
        for (int i = 0; i < sz; i++) {
            sourceItems.add(dataModel.getElementAt(i));
        }

        // Now move the selected items to the chosen list
        for (int i = selected.length - 1; i >= 0; i--) {
            chosenItems.add(sourceItems.remove(selected[i]));
        }

        Collections.reverse(chosenItems); // We built it backwards

        // Now install the two new lists
        sourceList.setListData(sourceItems.toArray());
        chosenList.setListData(chosenItems.toArray());
    }
1131490
def update(self, table, items, values):
        
        self._table = table
        self._limit = None
        items_values = ','.join(["{0} = '{1}'".format(k,v) for k,v in zip(items,values)])
        self._query = "UPDATE {0} SET {1}".format(self._table, items_values)

        return self
1093347
def update(self, *args, **kwargs):
        
        if args:
            for arg in args:
                if not isinstance(arg, ScriptField):
                    raise InvalidParameter("%s this must be a ScriptField or derivated" % arg)

        query = self._build_query()
        connection = self.model._meta.dj_connection
        query.fields = ["_id", "_type", "_index"]
        # results = connection.connection.search(query, indices=connection.database, doc_types=self.type,
        #                             model=self.model, scan=True)

        conn = connection.connection
        results = conn.search(query, indices=connection.database, doc_types=self.type, scan=True)

        for item in results:
            if kwargs:
                conn.update(item._meta.index, item._meta.type, item._meta.id, document=kwargs, bulk=True)
            for script in args:
                conn.update(item._meta.index, item._meta.type, item._meta.id,
                            script=script.script, lang=script.lang, params=script.params, bulk=True)

        connection.connection.flush_bulk(True)
        # Clear the result cache, in case this QuerySet gets reused.
        self._result_cache = None
1055396
private function update()
    {
        if ($this->urlObject) {
            \Closure::bind(function ($urlObject, $query) {
                $urlObject->url->query = $query === '' ? null : $query;
            }, null, $this->urlObject)->__invoke($this->urlObject, lib\URLencoding::serializeURLencoded($this->list));
        }
    }
1254251
def _get_upserts(queryset, model_objs_updated, model_objs_created, unique_fields):
    
    updated, created = _get_upserts_distinct(queryset, model_objs_updated, model_objs_created, unique_fields)
    return updated + created