Rename type to kind

This commit is contained in:
Koen Vlaswinkel
2023-12-07 10:19:57 +01:00
parent af68d99509
commit 1235172147
4 changed files with 6 additions and 6 deletions

View File

@@ -367,7 +367,7 @@ type QueryCompareResult = RawQueryCompareResult | InterpretedQueryCompareResult;
* to is the set of rows that have changes in the "to" query. * to is the set of rows that have changes in the "to" query.
*/ */
export type RawQueryCompareResult = { export type RawQueryCompareResult = {
type: "raw"; kind: "raw";
columns: readonly BqrsColumn[]; columns: readonly BqrsColumn[];
from: ResultRow[]; from: ResultRow[];
to: ResultRow[]; to: ResultRow[];
@@ -378,7 +378,7 @@ export type RawQueryCompareResult = {
* to is the set of results that have changes in the "to" query. * to is the set of results that have changes in the "to" query.
*/ */
type InterpretedQueryCompareResult = { type InterpretedQueryCompareResult = {
type: "interpreted"; kind: "interpreted";
sourceLocationPrefix: string; sourceLocationPrefix: string;
from: sarif.Result[]; from: sarif.Result[];
to: sarif.Result[]; to: sarif.Result[];

View File

@@ -36,7 +36,7 @@ export default function resultsDiff(
} }
const results: RawQueryCompareResult = { const results: RawQueryCompareResult = {
type: "raw", kind: "raw",
columns: fromResults.columns, columns: fromResults.columns,
from: arrayDiff(fromResults.tuples, toResults.tuples), from: arrayDiff(fromResults.tuples, toResults.tuples),
to: arrayDiff(toResults.tuples, fromResults.tuples), to: arrayDiff(toResults.tuples, fromResults.tuples),

View File

@@ -34,7 +34,7 @@ CompareTable.args = {
commonResultSetNames: ["edges", "nodes", "subpaths", "#select"], commonResultSetNames: ["edges", "nodes", "subpaths", "#select"],
currentResultSetName: "edges", currentResultSetName: "edges",
result: { result: {
type: "raw", kind: "raw",
columns: [ columns: [
{ name: "a", kind: "Entity" }, { name: "a", kind: "Entity" },
{ name: "b", kind: "Entity" }, { name: "b", kind: "Entity" },

View File

@@ -64,7 +64,7 @@ export default function CompareTable(props: Props) {
<tbody> <tbody>
<tr> <tr>
<td> <td>
{result.type === "raw" && ( {result.kind === "raw" && (
<RawCompareResultTable <RawCompareResultTable
columns={result.columns} columns={result.columns}
schemaName={comparison.currentResultSetName} schemaName={comparison.currentResultSetName}
@@ -75,7 +75,7 @@ export default function CompareTable(props: Props) {
)} )}
</td> </td>
<td> <td>
{result.type === "raw" && ( {result.kind === "raw" && (
<RawCompareResultTable <RawCompareResultTable
columns={result.columns} columns={result.columns}
schemaName={comparison.currentResultSetName} schemaName={comparison.currentResultSetName}