mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Merge pull request #4 from Kingsrook/feature/QQQ-26-exports-poc
QQQ-26 update backend-core, queryOutput interface
This commit is contained in:
@ -37,6 +37,8 @@ commands:
|
||||
name: Run Maven
|
||||
command: |
|
||||
mvn -s .circleci/mvn-settings.xml << parameters.maven_subcommand >>
|
||||
- store_artifacts:
|
||||
path: target/site/jacoco
|
||||
- run:
|
||||
name: Save test results
|
||||
command: |
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@ target/
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
.DS_Store
|
||||
|
2
pom.xml
2
pom.xml
@ -53,7 +53,7 @@
|
||||
<dependency>
|
||||
<groupId>com.kingsrook.qqq</groupId>
|
||||
<artifactId>qqq-backend-core</artifactId>
|
||||
<version>0.2.0-20220726.150942-14</version>
|
||||
<version>0.2.0-20220726.214150-15</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 3rd party deps specifically for this module -->
|
||||
|
@ -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,8 +185,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
|
||||
try
|
||||
{
|
||||
QueryOutput rs = new QueryOutput(queryInput);
|
||||
List<QRecord> records = new ArrayList<>();
|
||||
QueryOutput queryOutput = new QueryOutput(queryInput);
|
||||
|
||||
QTableMetaData table = queryInput.getTable();
|
||||
AbstractFilesystemTableBackendDetails tableDetails = getTableBackendDetails(AbstractFilesystemTableBackendDetails.class, table);
|
||||
@ -206,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:
|
||||
@ -217,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:
|
||||
@ -227,8 +225,7 @@ public abstract class AbstractBaseFilesystemAction<FILE>
|
||||
}
|
||||
}
|
||||
|
||||
rs.addRecords(records);
|
||||
return rs;
|
||||
return queryOutput;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
@ -220,9 +220,9 @@ public class TestUtils
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
public static QSession getMockSession()
|
||||
public static QSession getMockSession() throws QInstanceValidationException
|
||||
{
|
||||
MockAuthenticationModule mockAuthenticationModule = new MockAuthenticationModule();
|
||||
return (mockAuthenticationModule.createSession(null, null));
|
||||
return (mockAuthenticationModule.createSession(defineInstance(), null));
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,7 @@ class FilesystemBackendMetaDataTest
|
||||
String json = qInstanceAdapter.qInstanceToJsonIncludingBackend(qInstance);
|
||||
|
||||
QInstance deserialized = qInstanceAdapter.jsonToQInstanceIncludingBackends(json);
|
||||
assertThat(deserialized).usingRecursiveComparison()
|
||||
.ignoringFields("hasBeenValidated") // note, this field is @JsonIgnore
|
||||
.isEqualTo(qInstance);
|
||||
assertThat(deserialized.getBackends()).usingRecursiveComparison()
|
||||
.isEqualTo(qInstance.getBackends());
|
||||
}
|
||||
}
|
@ -70,8 +70,7 @@ class S3BackendMetaDataTest
|
||||
String json = qInstanceAdapter.qInstanceToJsonIncludingBackend(qInstance);
|
||||
|
||||
QInstance deserialized = qInstanceAdapter.jsonToQInstanceIncludingBackends(json);
|
||||
assertThat(deserialized).usingRecursiveComparison()
|
||||
.ignoringFields("hasBeenValidated") // note, this field is @JsonIgnore
|
||||
.isEqualTo(qInstance);
|
||||
assertThat(deserialized.getBackends()).usingRecursiveComparison()
|
||||
.isEqualTo(qInstance.getBackends());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user