Remove schema from interpreted results type

This commit is contained in:
Koen Vlaswinkel
2023-11-27 13:29:55 +01:00
parent e7c79f04c6
commit 297f5a9f67
6 changed files with 1 additions and 40 deletions

View File

@@ -1,5 +1,4 @@
import * as sarif from "sarif";
import { ResultSetSchema } from "../common/bqrs-cli-types";
import {
VariantAnalysis,
VariantAnalysisScannedRepositoryResult,
@@ -42,7 +41,6 @@ type RawTableResultSet = {
export type InterpretedResultSet<T> = {
t: "InterpretedResultSet";
readonly schema: ResultSetSchema;
name: string;
interpretation: InterpretationT<T>;
};

View File

@@ -19,7 +19,6 @@ export const WithoutCodeFlows = Template.bind({});
WithoutCodeFlows.args = {
resultSet: {
t: "InterpretedResultSet",
schema: { name: "alerts", rows: 1, columns: [] },
name: "alerts",
interpretation: {
data: {
@@ -335,7 +334,6 @@ export const WithCodeFlows = Template.bind({});
WithCodeFlows.args = {
resultSet: {
t: "InterpretedResultSet",
schema: { name: "alerts", rows: 1, columns: [] },
name: "alerts",
interpretation: {
data: {

View File

@@ -28,16 +28,6 @@ ResultTablesHeader.args = {
resultSetNames: ["#select", "alerts"],
resultSet: {
t: "InterpretedResultSet",
schema: {
name: "#select",
rows: 15,
columns: [
{
name: "x",
kind: "s",
},
],
},
name: "#select",
interpretation: {
sourceLocationPrefix: "/home/bulk-builder/bulk-builder",

View File

@@ -75,15 +75,6 @@ function getResultSets(
const tableName = getInterpretedTableName(interpretation);
resultSets.push({
t: "InterpretedResultSet",
// FIXME: The values of version, columns, tupleCount are
// unused stubs because a InterpretedResultSet schema isn't used the
// same way as a RawResultSet. Probably should pull `name` field
// out.
schema: {
name: tableName,
rows: 1,
columns: [],
},
name: tableName,
interpretation,
});
@@ -276,7 +267,7 @@ function getResultSetName(resultSet: ResultSet): string {
case "RawResultSet":
return resultSet.resultSet.name;
case "InterpretedResultSet":
return resultSet.schema.name;
return resultSet.name;
default:
assertNever(resultSet);
}

View File

@@ -174,11 +174,6 @@ export function ResultsApp() {
resultSet: {
t: "InterpretedResultSet",
name: tableName,
schema: {
name: tableName,
rows: 1,
columns: [],
},
interpretation: msg.interpretation,
},
selectedTable: tableName,

View File

@@ -8,7 +8,6 @@ import {
} from "../../../common/interface-types";
import * as fs from "fs-extra";
import { resolve } from "path";
import { ColumnKindCode } from "../../../common/bqrs-cli-types";
import { postMessage } from "../../common/post-message";
import { ColumnKind } from "../../../common/raw-result-types";
@@ -65,16 +64,6 @@ describe(ResultsApp.name, () => {
resultSetNames: ["#select"],
resultSet: {
t: "InterpretedResultSet",
schema: {
name: "#select",
rows: 1,
columns: [
{
name: "Path",
kind: ColumnKindCode.STRING,
},
],
},
name: "#select",
interpretation,
},