mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-19 13:40:44 +00:00
QQQ-26 update backend-core, queryOutput interface
This commit is contained in:
@ -25,7 +25,6 @@ package com.kingsrook.qqq.backend.module.filesystem.base.actions;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
@ -186,9 +185,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
|
||||
try
|
||||
{
|
||||
QueryOutput rs = new QueryOutput();
|
||||
List<QRecord> records = new ArrayList<>();
|
||||
rs.setRecords(records);
|
||||
QueryOutput queryOutput = new QueryOutput(queryInput);
|
||||
|
||||
QTableMetaData table = queryInput.getTable();
|
||||
AbstractFilesystemTableBackendDetails tableDetails = getTableBackendDetails(AbstractFilesystemTableBackendDetails.class, table);
|
||||
@ -207,7 +204,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
List<QRecord> recordsInFile = new CsvToQRecordAdapter().buildRecordsFromCsv(fileContents, table, null);
|
||||
addBackendDetailsToRecords(recordsInFile, file);
|
||||
|
||||
records.addAll(recordsInFile);
|
||||
queryOutput.addRecords(recordsInFile);
|
||||
break;
|
||||
}
|
||||
case JSON:
|
||||
@ -218,7 +215,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
List<QRecord> recordsInFile = new JsonToQRecordAdapter().buildRecordsFromJson(fileContents, table, null);
|
||||
addBackendDetailsToRecords(recordsInFile, file);
|
||||
|
||||
records.addAll(recordsInFile);
|
||||
queryOutput.addRecords(recordsInFile);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -228,7 +225,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
}
|
||||
}
|
||||
|
||||
return rs;
|
||||
return queryOutput;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user