update each column according to the columns in each table
337058
function () {
            var q = this._getPrimaryKeyQuery(), changed = this.__changed;
            var modelStatic = this._static,
                ctiColumns = modelStatic.__ctiColumns,
                tables = modelStatic.__ctiTables,
                self = this;
            return new PromiseList(tables.map(function (table) {
                var cols = ctiColumns[table], update = {};
                cols.forEach(function (c) {
                    if (!comb.isUndefined(changed[c])) {
                        update[c] = changed[c];
                    }
                });
                return comb.isEmpty(update) ? new Promise().callback() : self.db.from(table).filter(q).update(update);
            }), true)
                .chain(function () {
                    return self._updateReload();
                })
                .promise();
        }
960655
function _updateColspan(tableData, startColIndex, endColIndex) {
  tableData.forEach(rowData => {
    util.range(startColIndex, endColIndex + 1).forEach(colIndex => {
      const cellData = rowData [colIndex];

      if (util.isExisty(cellData.colMergeWith)) {
        const merger = rowData [cellData.colMergeWith];

        if (merger.colspan) {
          merger.colspan -= 1;
        }
      } else if (cellData.colspan > 1) {
        const lastMergedCellIndex = colIndex + cellData.colspan - 1;

        cellData.colspan -= (endColIndex - colIndex + 1);

        if (lastMergedCellIndex > endColIndex) {
          rowData [endColIndex + 1] = util.extend({}, cellData);
        }
      }
    });
  });
}
970775
function update($tableName, $values, $wheres)
  {
    assert(is_array($values));
    assert(is_array($wheres));

    $v = [];
    foreach ($values as $key => &$value)
      $v[] = "`$key`=".$this->quote($value);

    $w = $this->makeClauses($wheres);

    $this->q
    (
      "update $tableName set ".
      implode(",",$v).
      " where ".
      implode(" and ",$w)
    );
  }
775033
def queries(table):
    
    def update_where(updcols, wherecols):
        """Return an ``UPDATE`` statement that updates the columns ``updcols``
        when the ``wherecols`` match. Every column has a bound parameter of
        the same name.

        updcols are strings, wherecols are column objects

        """
        vmap = OrderedDict()
        for col in updcols:
            vmap[col] = bindparam(col)
        wheres = [
            c == bindparam(c.name) for c in wherecols
        ]
        tab = wherecols[0].table
        return tab.update().values(**vmap).where(and_(*wheres))

    r = allegedb.alchemy.queries_for_table_dict(table)

    rulebooks = table['rulebooks']
    r['rulebooks_update'] = update_where(['rules'], [rulebooks.c.rulebook, rulebooks.c.branch, rulebooks.c.turn, rulebooks.c.tick])

    for t in table.values():
        key = list(t.primary_key)
        if 'branch' in t.columns and 'turn' in t.columns and 'tick' in t.columns:
            branch = t.columns['branch']
            turn = t.columns['turn']
            tick = t.columns['tick']
            if branch in key and turn in key and tick in key:
                key = [branch, turn, tick]
        r[t.name + '_dump'] = select(list(t.c.values())).order_by(*key)
        r[t.name + '_insert'] = t.insert().values(tuple(bindparam(cname) for cname in t.c.keys()))
        r[t.name + '_count'] = select([func.COUNT('*')]).select_from(t)

    r['del_char_things'] = table['things'].delete().where(
        table['things'].c.character == bindparam('character')
    )

    r['del_char_avatars'] = table['avatars'].delete().where(
        table['avatars'].c.character_graph == bindparam('character')
    )
    things = table['things']
    r['del_things_after'] = things.delete().where(and_(
        things.c.character == bindparam('character'),
        things.c.thing == bindparam('thing'),
        things.c.branch == bindparam('branch'),
        or_(
            things.c.turn > bindparam('turn'),
            and_(
                things.c.turn == bindparam('turn'),
                things.c.tick >= bindparam('tick')
            )
        )
    ))
    avatars = table['avatars']
    r['del_avatars_after'] = avatars.delete().where(and_(
        avatars.c.character_graph == bindparam('character'),
        avatars.c.avatar_graph == bindparam('graph'),
        avatars.c.avatar_node == bindparam('avatar'),
        avatars.c.branch == bindparam('branch'),
        or_(
            avatars.c.turn > bindparam('turn'),
            and_(
                avatars.c.turn == bindparam('turn'),
                avatars.c.tick >= bindparam('tick')
            )
        )
    ))

    branches = table['branches']

    r['branch_children'] = select(
        [branches.c.branch]
    ).where(
        branches.c.parent == bindparam('branch')
    )

    tc = table['turns_completed']
    r['turns_completed_update'] = update_where(['turn'], [tc.c.branch])

    return r
1167252
def update(self, frame_no):
        
        for column in self._columns:
            for widget in column:
                widget.update(frame_no)
549060
@Override
    protected void update(List<TableInfo> tableInfos)
    {
        try
        {
            HttpResponse response = null;

            createDatabaseIfNotExist(false);

            for (TableInfo tableInfo : tableInfos)
            {
                String id = CouchDBConstants.DESIGN + tableInfo.getTableName();
                CouchDBDesignDocument designDocument = getDesignDocument(id);
                designDocument.setLanguage(CouchDBConstants.LANGUAGE);
                Map<String, MapReduce> views = designDocument.getViews();
                if (views == null)
                {
                    views = new HashMap<String, MapReduce>();
                }
                for (IndexInfo indexInfo : tableInfo.getColumnsToBeIndexed())
                {
                    createViewIfNotExist(views, indexInfo.getColumnName());
                }

                // for id column.
                createViewIfNotExist(views, tableInfo.getIdColumnName());

                // for select all.
                createViewForSelectAllIfNotExist(tableInfo, views);

                // for selecting specific field
                createViewForSelectSpecificFields(views);

                designDocument.setViews(views);

                URI uri = null;
                if (designDocument.get_rev() == null)
                {
                    uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                            CouchDBConstants.URL_SEPARATOR + databaseName.toLowerCase()
                                    + CouchDBConstants.URL_SEPARATOR + id, null, null);
                }
                else
                {
                    StringBuilder builder = new StringBuilder("rev=");
                    builder.append(designDocument.get_rev());
                    uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                            CouchDBConstants.URL_SEPARATOR + databaseName.toLowerCase()
                                    + CouchDBConstants.URL_SEPARATOR + id, builder.toString(), null);
                }
                HttpPut put = new HttpPut(uri);

                String jsonObject = gson.toJson(designDocument);
                StringEntity entity = new StringEntity(jsonObject);
                put.setEntity(entity);
                try
                {
                    response = httpClient.execute(httpHost, put, CouchDBUtils.getContext(httpHost));
                }
                finally
                {
                    CouchDBUtils.closeContent(response);
                }
            }
            // creating views for various aggregations in the following
            // order:
            // -- COUNT SUM MAX MIN AVG
            // IMPORTANT: The aggregations does not support WHERE clause
            createDesignDocForAggregations();
        }
        catch (Exception e)
        {
            logger.error("Error while creating database, caused by {}.", e);
            throw new SchemaGenerationException("Error while creating database", e, "couchDB");
        }
    }
1293423
def updateDataset(self):
        """"""
        self.__updateDataItem()
        self.__countNbRecords()
        self.__columns = self.__parseColumns()
337543
function update() {
    var updateData = this._prepUpdate(this.single.update);
    var wheres = this.where();
    var returning = this.single.returning;
    return {
      sql: 'update ' + this.tableName + ' set ' + updateData.join(', ') + (wheres ? ' ' + wheres : '') + this._returning(returning),
      returning: returning
    };
  }
175859
def update(self, table_name, where_slice, new_values):
        
        new_values = quote_param(new_values)

        where_clause = SQL_AND.join([
            quote_column(k) + "=" + quote_value(v) if v != None else quote_column(k) + SQL_IS_NULL
            for k, v in where_slice.items()
        ])

        command = (
            "UPDATE " + quote_column(table_name) + "\n" +
            "SET " +
            sql_list([quote_column(k) + "=" + v for k, v in new_values.items()]) +
            SQL_WHERE +
            where_clause
        )
        self.execute(command, {})
749615
public function updateTable()
	{
		//get the instance of the FileInfo class
		$file_info = FileInfo::Create($this->table_file_path);

		//this file already exists
		if($file_info->isFile())
		{
			//load the clas into momeory
			include $file_info->getPathname();

			$class_name = substr($file_info->getFilename(), 0,-4);

			//get the database table class
			$table_object = new $class_name();

			//get the table columns, create SQL and execute
			$this->getColumns($table_object)->updateSQL()->executeUpdate();

			//echo "{$this->query_string}";exit(0);

		}

		//this file has not been created yet
		else
		{


		}

	}
322598
def upsert(db, table, key_cols, update_dict):
    
    with db:
        cur = db.cursor()
        cur.execute(
            'UPDATE {} SET {} WHERE {}'.format(
                table,
                ','.join(_sqlpformat(col) for col in update_dict.keys()),
                ' AND '.join(_sqlpformat(col) for col in key_cols),
            ),
            update_dict,
        )
        if db.changes() == 0:
            keys, values = zip(*update_dict.items())
            cur.execute(
                'INSERT INTO {} ({}) VALUES ({})'.format(
                    table,
                    ','.join(keys),
                    ','.join('?' for _ in values)),
                values)
4560
def update(self, **kwargs):
        
        data = kwargs.get('data')
        if data is not None:
            if (util.pd and isinstance(data, util.pd.DataFrame) and
                list(data.columns) != list(self.data.columns) and self._index):
                data = data.reset_index()
            self.verify(data)
            kwargs['data'] = self._concat(data)
            self._count += 1
        super(Buffer, self).update(**kwargs)
216
def _sync_table(self, columns):
        """"""
        if self._table is None:
            # Load an existing table from the database.
            self._reflect_table()
        if self._table is None:
            # Create the table with an initial set of columns.
            if not self._auto_create:
                raise DatasetException("Table does not exist: %s" % self.name)
            # Keep the lock scope small because this is run very often.
            with self.db.lock:
                self._threading_warn()
                self._table = SQLATable(self.name,
                                        self.db.metadata,
                                        schema=self.db.schema)
                if self._primary_id is not False:
                    # This can go wrong on DBMS like MySQL and SQLite where
                    # tables cannot have no columns.
                    primary_id = self._primary_id or self.PRIMARY_DEFAULT
                    primary_type = self._primary_type or Types.integer
                    increment = primary_type in [Types.integer, Types.bigint]
                    column = Column(primary_id, primary_type,
                                    primary_key=True,
                                    autoincrement=increment)
                    self._table.append_column(column)
                for column in columns:
                    if not column.name == self._primary_id:
                        self._table.append_column(column)
                self._table.create(self.db.executable, checkfirst=True)
        elif len(columns):
            with self.db.lock:
                self._reflect_table()
                self._threading_warn()
                for column in columns:
                    if not self.has_column(column.name):
                        self.db.op.add_column(self.name, column, self.db.schema)
                self._reflect_table()
1150814
public function update($table, $columns, $condition = [], array $params = [])
    {
        $request = $this->db->getQueryBuilder()->update($table, $columns, $condition, $params);

        return $this->setRequest($request);
    }
940473
private function mergeColumns(): void
  {
    foreach ($this->oldColumns as $table_name => $table)
    {
      foreach ($table as $column_name => $column)
      {
        if (isset($this->columns[$table_name][$column_name]))
        {
          $this->columns[$table_name][$column_name]['constant_name'] = $column['constant_name'];
        }
      }
    }
  }
607974
def _update_internal_column_state(self, column_names):
        
        for k in column_names:
            if k not in self._column_name_idx:
                self._column_name_idx[k] = len(self._column_name_list)
                self._column_name_list.append(k)
304411
def _update_rows(self):
        
        for row, item in enumerate(self._items):
            item.row = row  # Row is the Parent item
            item.column = 0
        
        for column, item in enumerate(self._columns):
            item.row = self.row  # Row is the Parent item
            item.column = column