batch export

This commit is contained in:
SwallowGG
2024-06-21 17:21:28 +08:00
parent 96e6340f8c
commit 9421c3d3f4
31 changed files with 871 additions and 764 deletions

View File

@ -31,7 +31,6 @@ import ai.chat2db.server.tools.common.util.EasyCollectionUtils;
import ai.chat2db.server.tools.common.util.EasyEnumUtils;
import ai.chat2db.server.web.api.aspect.ConnectionInfoAspect;
import ai.chat2db.server.web.api.controller.rdb.request.DataExportRequest;
import ai.chat2db.spi.jdbc.DefaultValueHandler;
import ai.chat2db.spi.sql.Chat2DBContext;
import ai.chat2db.spi.sql.SQLExecutor;
import ai.chat2db.spi.util.JdbcUtils;
@ -135,7 +134,7 @@ public class RdbDmlExportController {
List<List<String>> writeDataList = Lists.newArrayList();
writeDataList.add(dataList);
excelWrapper.getExcelWriter().write(writeDataList, excelWrapper.getWriteSheet());
}, false, new DefaultValueHandler());
}, false);
} finally {
if (excelWrapper.getExcelWriter() != null) {
excelWrapper.getExcelWriter().finish();
@ -166,7 +165,7 @@ public class RdbDmlExportController {
sqlInsertStatement.setValues(valuesClause);
printWriter.println(SQLUtils.toSQLString(sqlInsertStatement, dbType, INSERT_FORMAT_OPTION) + ";");
}, false, new DefaultValueHandler());
}, false);
}
}

View File

@ -19,7 +19,6 @@ import ai.chat2db.server.web.api.controller.rdb.doc.conf.ExportOptions;
import ai.chat2db.server.web.api.controller.rdb.factory.ExportServiceFactory;
import ai.chat2db.server.web.api.controller.rdb.request.DataExportRequest;
import ai.chat2db.server.web.api.controller.rdb.vo.TableVO;
import ai.chat2db.spi.jdbc.DefaultValueHandler;
import ai.chat2db.spi.model.Table;
import ai.chat2db.spi.sql.Chat2DBContext;
import ai.chat2db.spi.sql.ConnectInfo;
@ -260,7 +259,7 @@ public class TaskBizService {
List<List<String>> writeDataList = Lists.newArrayList();
writeDataList.add(dataList);
excelWrapper.getExcelWriter().write(writeDataList, excelWrapper.getWriteSheet());
}, false, new DefaultValueHandler());
}, false);
} finally {
if (excelWrapper.getExcelWriter() != null) {
excelWrapper.getExcelWriter().finish();
@ -288,7 +287,7 @@ public class TaskBizService {
sqlInsertStatement.setValues(valuesClause);
printWriter.println(SQLUtils.toSQLString(sqlInsertStatement, dbType, INSERT_FORMAT_OPTION) + ";");
}, false, new DefaultValueHandler());
}, false);
}
}