private void exportUpdate(Connection connection, String querySql, SqlBuilder sqlBuilder,
                              ValueProcessor valueProcessor,
                              String databaseName, String schemaName, String tableName, PrintWriter writer) {
        List<String> sqlList = new ArrayList<>(BATCH_SIZE);
        SQLExecutor.getInstance().execute(connection, querySql, BATCH_SIZE, resultSet -> {
            Map<String, String> primaryKeyMap = getPrimaryKeyMap(connection, databaseName, schemaName, tableName);
            while (resultSet.next()) {
                Map<String, String> row = extractRowDataAsMap(resultSet, valueProcessor, primaryKeyMap);
                String sql = sqlBuilder.buildUpdateSql(databaseName, schemaName, tableName, row, primaryKeyMap);
                sqlList.add(sql);
                if (sqlList.size() >= BATCH_SIZE || resultSet.isLast()) {
                    writeSqlList(writer, sqlList);
                }
            }
        });
        TaskManager.increaseCurrent();
    }
@param connection
@param databaseExportDataParam
@param file
chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/rdb/data/sql/SqlDataExporter.java