CE-881 - Refactoring exports & reports

- add some fields together into ReportDestination class
- pass more data into export streamers (views) and add preRun method
- Add queryHint POTENTIALLY_LARGE_NUMBER_OF_RESULTS
- add pivot views
- optionally take in full ReportMetaData object instead of a name (e.g., for a user-defined/saved report)
This commit is contained in:
2024-03-27 19:50:06 -05:00
parent 05f31d0722
commit e078015732
17 changed files with 421 additions and 165 deletions

View File

@ -60,6 +60,7 @@ import com.kingsrook.qqq.backend.core.model.actions.processes.RunProcessInput;
import com.kingsrook.qqq.backend.core.model.actions.processes.RunProcessOutput;
import com.kingsrook.qqq.backend.core.model.actions.reporting.ExportInput;
import com.kingsrook.qqq.backend.core.model.actions.reporting.ExportOutput;
import com.kingsrook.qqq.backend.core.model.actions.reporting.ReportDestination;
import com.kingsrook.qqq.backend.core.model.actions.reporting.ReportFormat;
import com.kingsrook.qqq.backend.core.model.actions.shared.mapping.AbstractQFieldMapping;
import com.kingsrook.qqq.backend.core.model.actions.shared.mapping.QKeyBasedFieldMapping;
@ -618,9 +619,10 @@ public class QPicoCliImplementation
/////////////////////////////////////////////
ExportInput exportInput = new ExportInput();
exportInput.setTableName(tableName);
exportInput.setReportFormat(reportFormat);
exportInput.setFilename(filename);
exportInput.setReportOutputStream(outputStream);
exportInput.setReportDestination(new ReportDestination()
.withReportFormat(reportFormat)
.withFilename(filename)
.withReportOutputStream(outputStream));
exportInput.setLimit(subParseResult.matchedOptionValue("limit", null));
exportInput.setQueryFilter(generateQueryFilter(subParseResult));