@param $identifies
@param $updateColumnsList
@param $identifyColumn
@param $updateColumns

@return int
339570
private function partUpdate($identifies, $updateColumnsList, $identifyColumn, $updateColumns)
    {
        $sql = "UPDATE {$this->table} SET ";

        $updateSql = array();

        $params = array();
        foreach ($updateColumns as $updateColumn) {
            $caseWhenSql = "{$updateColumn} = CASE {$identifyColumn} ";

            foreach ($identifies as $identifyIndex => $identify) {
                $caseWhenSql .= ' WHEN ? THEN ? ';
                $params[] = $identify;
                $params[] = $updateColumnsList[$identifyIndex][$updateColumn];
                if ($identifyIndex === count($identifies) - 1) {
                    $caseWhenSql .= " ELSE {$updateColumn} END";
                }
            }

            $updateSql[] = $caseWhenSql;
        }

        $sql .= implode(',', $updateSql);

        $marks = str_repeat('?,', count($identifies) - 1).'?';
        $sql .= " WHERE {$identifyColumn} IN ({$marks})";
        $params = array_merge($params, $identifies);

        return $this->db()->executeUpdate($sql, $params);
    }
645039
protected static function buildInsertOnDuplicateSql(array $data, array $updateColumns = null)
    {
        $first = static::getFirstRow($data);

        $sql  = 'INSERT INTO `' . static::getTablePrefix() . static::getTableName() . '`(' . static::getColumnList($first) . ') VALUES' . PHP_EOL;
        $sql .=  static::buildQuestionMarks($data) . PHP_EOL;
        $sql .= 'ON DUPLICATE KEY UPDATE ';

        if (empty($updateColumns)) {
            $sql .= static::buildValuesList(array_keys($first));
        } else {
            $sql .= static::buildValuesList($updateColumns);
        }

        return $sql;
    }
125518
protected function addIdentifierToTags(string $entryIdentifier, array $tags)
    {
        foreach ($tags as $tag) {
            // Update tag-to-identifier index
            $identifiers = $this->findIdentifiersByTag($tag);
            if (array_search($entryIdentifier, $identifiers) === false) {
                $identifiers[] = $entryIdentifier;
                $this->memcache->set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
            }

            // Update identifier-to-tag index
            $existingTags = $this->findTagsByIdentifier($entryIdentifier);
            if (array_search($tag, $existingTags) === false) {
                $this->memcache->set($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
            }
        }
    }
253006
public final function setIds(array $ids): void
    {
        foreach ($ids as $id) {
            $this->ids[] = (int) $id;
        }
    }
159806
@Override
	public void updateStepStatus(long stepExecutionId, StepStatus stepStatus) {
		logger.entering(CLASSNAME, "updateStepStatus", new Object[] {stepExecutionId, stepStatus});

		if (logger.isLoggable(Level.FINE)) {
			logger.fine("Updating StepStatus to: " + stepStatus.getBatchStatus());
		}
		Connection conn = null;
		PreparedStatement statement = null;
		try {
			conn = getConnection();
			statement = conn.prepareStatement("UPDATE stepstatus SET obj = ? WHERE id = ?");
			statement.setBytes(1, serializeObject(stepStatus));
			statement.setLong(2, stepExecutionId);
			statement.executeUpdate();
		} catch (SQLException e) {
			throw new PersistenceException(e);
		} catch (IOException e) {
			throw new PersistenceException(e);
		} finally {
			cleanupConnection(conn, null, statement);
		}
		logger.exiting(CLASSNAME, "updateStepStatus");
	}
957205
public int update(List<ENTITY> entities) {

        if (entities == null || entities.size() == 0) {
            recordLog(" param entity is null!");
            return 0;
        }

        final List<Query> queries = queryGenerator.getUpdateQuery(entities);
        String sql = queries.get(0).getSql();
        jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {

            public void setValues(PreparedStatement stmt, int index) throws SQLException {
                int i = 1;
                List<Object> params = queries.get(index).getParams();
                for (Object o : params) {
                    stmt.setObject(i++, o);
                }
            }

            public int getBatchSize() {
                return queries.size();
            }
        });

        return entities.size();
    }
956430
@Override
    public Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
            Object columnValue, Class entityClazz)
    {
        EntityMetadata m = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClazz);

        byte[] valueInBytes = HBaseUtils.getBytes(columnValue);
        Filter f = new SingleColumnValueFilter(Bytes.toBytes(tableName), Bytes.toBytes(columnName), CompareOp.EQUAL,
                valueInBytes);
        KeyOnlyFilter keyFilter = new KeyOnlyFilter();
        FilterList filterList = new FilterList(f, keyFilter);
        try
        {
            return handler.scanRowyKeys(filterList, schemaName, tableName, columnName + "_" + columnValue, m
                    .getIdAttribute().getBindableJavaType());
        }
        catch (IOException e)
        {
            log.error("Error while executing findIdsByColumn(), Caused by: .", e);
            throw new KunderaException(e);
        }
    }
1115659
public function updateRows(string $table, array $set, array $where): int
    {
        $update = new Update($this->options);
        $sqlParams = $update->buildQuery($table, $set, $where);
        return $this->query($sqlParams->getSql(), $sqlParams->getParams())->getAffected();
    }
957220
public function update($infos)
    {
        $tabela        = $infos['table'];
        $campos        = $infos['fields'];
        $camposV       = $infos['values'];
        $whereCriteria = $infos['where'];

        try {
            $camposNome = [];
            for ($i = 0; $i < count($campos); $i++) {
                if ($camposV[$i] != null) {
                    $camposNome[$i] = $campos[$i];
                }
            }

            $camposNome = array_values($camposNome);
            $this->sql = "UPDATE $tabela SET ";

            for ($i = 0; $i < count($camposNome); $i++) {
                if (!empty($camposNome[$i])) {
                    if ($i != count($camposNome) - 1) {
                        $this->sql .= $camposNome[$i] . " = :" . $camposNome[$i] . ", ";
                    } else {
                        $this->sql .= $camposNome[$i] . " = :" . $camposNome[$i];
                    }
                }
            }

            if (!empty($whereCriteria)) {
                $this->sql .= " WHERE " . $whereCriteria . " ";
            }

            return $this->sql . ";";

        } catch (PhiberException $e) {
            throw new PhiberException(new Internationalization("query_processor_error"));
        }
    }
1009108
@Override
    protected void update(List<TableInfo> tableInfos)
    {
        if (!clusterManager.hasBucket(databaseName))
        {
            addBucket(databaseName);
            createIdIndex(databaseName);
        }
    }
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)
    );
  }
699860
public static void addIds(List<Entry> entries, boolean updateRdn) {
        for (Entry entry : entries) {
            addId(entry, updateRdn);
        }
    }
553133
public static int findRowIdColumnIndex(String[] columnNames) {
        int length = columnNames.length;
        for (int i = 0; i < length; i++) {
            if (columnNames[i].equals("_id")) {
                return i;
            }
        }
        return -1;
    }
731959
protected function columnExists( $columnToFind, $matrixColumnsDefinition )
    {
        $columns = $matrixColumnsDefinition->attribute( 'columns' );

        foreach ( $columns as $column )
        {
            if ( $column['identifier'] === $columnToFind['identifier'] )
                return true;
        }

        return false;
    }
1026864
public static function upsert(array $values, array $updateColumns = null)
    {

        if (empty($values))
            return true;

        if (! is_array(reset($values))) {

            $values = [$values];

        } else {

            foreach ($values as $key => $value) {

                ksort($value);
                $values[$key] = $value;
            }
        }

        $model = self::getModel();

        $sql = static::compileUpsert(
            $model->getConnection()->getQueryGrammar(), $values, $updateColumns);

        $values = static::inLineArray($values);

        return $model->getConnection()->affectingStatement($sql, $values);
    }
1164266
public Integer updateInfoByIdService(String id,Map requestParamMap,String tableName,String cusCondition,String cusSetStr) throws Exception{
		return updateInfoServiceInner(id,requestParamMap,tableName,cusCondition,cusSetStr,null);
	}
1320681
public function getRecordId(array $identifier, string $autoIncrementColumn): int
    {
        if (isset($identifier[$autoIncrementColumn])) {
            return (int)$identifier[$autoIncrementColumn];
        }
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select($autoIncrementColumn)
            ->from($this->table)
            ->setParameters($identifier);
        foreach (array_keys($identifier) as $key) {
            $queryBuilder->andWhere("$key = :$key");
        }
        $stmt = $this->connection->prepare($queryBuilder->getSQL());
        $stmt->execute($identifier);
        return (int)$stmt->fetchColumn();
    }