private void exportMultiInsert(Connection connection, String querySql, Boolean containsHeader,
                                   SqlBuilder sqlBuilder, ValueProcessor valueProcessor,
                                   String databaseName, String schemaName, String tableName, PrintWriter writer) {
        SQLExecutor.getInstance().execute(connection, querySql, BATCH_SIZE, resultSet -> {
            List<List<String>> dataList = new ArrayList<>(BATCH_SIZE);
            List<String> header = containsHeader ? ResultSetUtils.getRsHeader(resultSet) : null;
            while (resultSet.next()) {
                dataList.add(extractRowData(resultSet, valueProcessor));
            }
            String sql = sqlBuilder.buildMultiInsertSql(databaseName, schemaName, tableName, header, dataList);
            writer.println(sql+";");
            writer.flush();
        });
        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