private void exportSql(Connection connection, DatabaseExportDataParam databaseExportDataParam, String tableName, PrintWriter writer) {
        String databaseName = databaseExportDataParam.getDatabaseName();
        String schemaName = databaseExportDataParam.getSchemaName();
        Boolean containsHeader = databaseExportDataParam.getContainsHeader();
        MetaData metaData = Chat2DBContext.getMetaData();
        String querySql = metaData.getSqlBuilder().buildTableQuerySql(databaseName, schemaName, tableName);
        SqlBuilder sqlBuilder = metaData.getSqlBuilder();
        ValueProcessor valueProcessor = metaData.getValueProcessor();
        String sqyType = databaseExportDataParam.getSqyType();

        switch (sqyType) {
            case "single" -> exportSingleInsert(connection, querySql, containsHeader, sqlBuilder,
                                                valueProcessor, databaseName, schemaName, tableName, writer);
            case "multi" -> exportMultiInsert(connection, querySql, containsHeader, sqlBuilder,
                                              valueProcessor, databaseName, schemaName, tableName, writer);
            case "update" -> exportUpdate(connection, querySql, sqlBuilder, valueProcessor,
                                          databaseName, schemaName, tableName, writer);
            default -> throw new IllegalArgumentException("Unsupported sqyType: " + sqyType);
        }
    }
@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