Executes update.
@return Triple of update count, generated keys (or null)
and optional warning
977070
private ImmutableTriple<Integer,ResultSet,SQLWarning> update(final String sql, final int autoGeneratedKeys) throws SQLException {

        checkClosed();

        try {
            final UpdateResult res = this.handler.whenSQLUpdate(sql, NO_PARAMS);
            final SQLWarning w = res.getWarning();
            final ResultSet k = (res.generatedKeys == null 
                                 || autoGeneratedKeys == NO_GENERATED_KEYS) 
                ? EMPTY_GENERATED_KEYS.withStatement(this) 
                : res.generatedKeys.resultSet().withStatement(this);
            
            return ImmutableTriple.of(res.getUpdateCount(), k, w);
        } catch (SQLException se) {
            throw se;
        } catch (Exception e) {
            throw new SQLException(e.getMessage(), e);
        } // end of catch
    }
832324
@Override
    public int executeUpdate() throws SQLException
    {
        checkClosed();
        if (!this.Query.isOfType(VoltSQL.TYPE_EXEC,VoltSQL.TYPE_UPDATE)) {
            throw SQLError.get(SQLError.ILLEGAL_STATEMENT, this.Query.toSqlString());
        }
        int result = this.executeUpdate(this.Query.getExecutableQuery(this.parameters));
        this.parameters = this.Query.getParameterArray();
        return result;
    }
105066
Result executeUpdateStatement(Session session) {

        int            count          = 0;
        Expression[]   colExpressions = updateExpressions;
        HashMappedList rowset         = new HashMappedList();
        Type[]         colTypes       = baseTable.getColumnTypes();
        RangeIteratorBase it = RangeVariable.getIterator(session,
            targetRangeVariables);
        Expression checkCondition = null;

        if (targetTable != baseTable) {
            checkCondition =
                ((TableDerived) targetTable).getQueryExpression()
                    .getMainSelect().checkQueryCondition;
        }

        while (it.next()) {
            session.sessionData.startRowProcessing();

            Row      row  = it.getCurrentRow();
            Object[] data = row.getData();
            Object[] newData = getUpdatedData(session, baseTable,
                                              updateColumnMap, colExpressions,
                                              colTypes, data);

            if (checkCondition != null) {
                it.currentData = newData;

                boolean check = checkCondition.testCondition(session);

                if (!check) {
                    throw Error.error(ErrorCode.X_44000);
                }
            }

            rowset.add(row, newData);
        }

/* debug 190
        if (rowset.size() == 0) {
            System.out.println(targetTable.getName().name + " zero update: session "
                               + session.getId());
        } else if (rowset.size() >1) {
           System.out.println("multiple update: session "
                              + session.getId() + ", " + rowset.size());
       }

//* debug 190 */
        count = update(session, baseTable, rowset);

        return Result.getUpdateCountResult(count);
    }
713095
public void update(){
        logger.info("Begin automatic schema updating.");
        if(!existsTable()){
            createTable();
        }

        int currentVersion = getCurrentVersion();
        int version = currentVersion;
        String sql = null;

        while((sql = getSql(version + 1)) != null){
            if(sql.trim().length() != 0){
                sqlManager.executeUpdate(new StringSqlResource(sql));
            }
            version++;
        }

        if(version != currentVersion){
            updateVersion(version);
            logger.info(String.format("Schema was updated to version %d.", version));
        } else {
            logger.info("There are no updates.");
        }

        logger.info("End automatic schema updating.");
    }
1092345
public static int executeUpdate(final String sql, final Object... args)
    {
       return SqlClosure.sqlExecute(c -> executeUpdate(c, sql, args));
    }
291619
public int update(Entity entity) throws SQLException {
		if (CollectionUtil.isEmpty(entity)) {
			return 0;
		}
		entity = fixEntity(entity);
		Object pk = entity.get(primaryKeyField);
		if (null == pk) {
			throw new SQLException(StrUtil.format("Please determine `{}` for update", primaryKeyField));
		}

		final Entity where = Entity.create(tableName).set(primaryKeyField, pk);
		final Entity record = (Entity) entity.clone();
		record.remove(primaryKeyField);

		return db.update(record, where);
	}
775064
@Override
    public boolean execute() throws SQLException {
        boolean isOk = false;

        try {
            boolean result = internalStmt.execute();
            isOk = true;

            return result;
        } finally {
            poolableConn.updateLastSQLExecutionTime(isOk);
        }
    }
1250141
protected int doUpdate(JdbcTemplate jdbcTemplate, TaskRequest req, TaskResponse res) {
        //Setup the update parameters and setter
        final List<Phrase> parametersInUse = update_parameters != null ? update_parameters : parameters;
        final PreparedStatementSetter preparedStatementSetter = new PhraseParameterPreparedStatementSetter(parametersInUse, req, res);
        
        //Get the update sql and execute the update.
        final String fUpdateSql = (String) update_sql.evaluate(req, res);
        return jdbcTemplate.update(fUpdateSql, preparedStatementSetter);
    }
89526
public function update()
    {
        // convert to condition.
        $args = func_get_args();
        $attributes = array_shift($args);
        $cond = call_user_func_array(array($this, 'toCondition'), $args);

        // to SQL.
        $sql = $cond->toUpdateSQL($attributes);
        var_dump($sql, $cond->getParams());

        // query.
        $sth = $this->query($sql, $cond->getParams());
        return $sth->isSuccess();
    }
175830
public function update()
    {
        if ($this->dirty === []) {
            return true;
        }

        $this->defaultTable();
        $this->sql['SET'] = $this->dirty;
        $this->eq($this->primary, $this->__get($this->primary));

        if (DB::update($this->sql)) {
            return $this->dirty()->reset();
        }

        return false;
    }
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
    };
  }
1004536
function update(instance, array, tx, callback) {
    var
        model = instance.__model,
        beforeUpdate = model.__beforeUpdate,
        updates,
        params,
        sql;
    if (beforeUpdate) {
        beforeUpdate(instance);
    }
    if (!array) {
        array = model.__updateAttributesArray;
    }
    updates = _.map(array, function (attr) {
        return '`' + attr + '`=?';
    });
    params = _.map(array, function (attr) {
        return instance[attr];
    });
    params.push(instance[model.__primaryKey]);
    sql = utils.format('update `%s` set %s where `%s`=?', model.__table, updates.join(', '), model.__primaryKey);
    smartRunSQL(model.__pool, sql, params, tx, function (err, result) {
        if (err) {
            return callback(err);
        }
        callback(null, instance);
    });
}
453556
public int executeUpdate() throws SQLException {
        final boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
        SQLExecuteCallback<Integer> executeCallback = SQLExecuteCallbackFactory.getPreparedUpdateSQLExecuteCallback(getDatabaseType(), isExceptionThrown);
        List<Integer> results = executeCallback(executeCallback);
        if (isAccumulate()) {
            return accumulate(results);
        } else {
            return results.get(0);
        }
    }
839869
@Override
	public synchronized void update(long paramId, int used, String flags,
			String values) throws DatabaseException {
    	SqlPreparedStatementWrapper psUpdate = null;
        try {
        	psUpdate = DbSQL.getSingleton().getPreparedStatement("param.ps.update");
			psUpdate.getPs().setInt(1, used);
			psUpdate.getPs().setString(2, flags);
			psUpdate.getPs().setString(3, values);
			psUpdate.getPs().setLong(4, paramId);
			psUpdate.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psUpdate);
		}
    }
1275148
@Override
  public MutationResult execute() {
    if (pendingMutations == null || pendingMutations.isEmpty()) {
      return new MutationResultImpl(true, 0, null);
    }
    final BatchMutation<K> mutations = pendingMutations.makeCopy();
    pendingMutations = null;
    return new MutationResultImpl(keyspace.doExecuteOperation(new Operation<Void>(OperationType.WRITE) {
      @Override
      public Void execute(Cassandra.Client cassandra) throws Exception {
        cassandra.batch_mutate(mutations.getMutationMap(),
          ThriftConverter.consistencyLevel(consistencyLevelPolicy.get(operationType)));
        return null;
      }
    }));

  }
556526
@SuppressWarnings("unchecked")
	@Override
	public Integer execute() {
		logger.fine("Executing [AppEngineUpdate] command");
		
		if (properties.size() == 0) {
			throw new IllegalStateException("'properties' must be set");
		}
		
		GetList<E> command = session.get(metamodel);
		
		if (filters != null) {
			command.filter(filters.toArray(new Filter<?>[] {}));
		}
		
		int i = 0;
		
		for (E entity : command.execute()) {
			for (Property<?, ?> property : properties.keySet()) {
				Object object = properties.get(property);
				
				if (object instanceof Modification) {
					Modification<Object> modification = (Modification<Object>) object;
					((Property<E, ?>) property).set(entity, modification.apply(property.get(entity)));
				} else {
					((Property<E, ?>) property).set(entity, object);
				}
			}
			
			session.update(entity);
			i++;
		}
		
		return i;
	}
128025
@Override
	public int doUpdate(final SqlContext sqlContext, final PreparedStatement preparedStatement, final int result) {
		LOG.debug("SQL:{} executed. Count:{} items.", sqlContext.getSqlName(), result);
		return result;
	}