Make message and succesful required
This commit is contained in:
@@ -57,8 +57,8 @@ function mapCompletedQueryInfoToDomainModel(
|
||||
return new CompletedQueryInfo(
|
||||
mapQueryEvaluationInfoToDomainModel(completedQuery.query),
|
||||
completedQuery.logFileLocation,
|
||||
completedQuery.successful ?? completedQuery.sucessful,
|
||||
completedQuery.message,
|
||||
completedQuery.successful ?? false,
|
||||
completedQuery.message ?? "",
|
||||
sortState,
|
||||
completedQuery.resultCount,
|
||||
sortedResults,
|
||||
|
||||
@@ -53,8 +53,8 @@ export class CompletedQueryInfo implements QueryWithResults {
|
||||
constructor(
|
||||
public readonly query: QueryEvaluationInfo,
|
||||
public readonly logFileLocation: string | undefined,
|
||||
public readonly successful: boolean | undefined,
|
||||
public readonly message: string | undefined,
|
||||
public readonly successful: boolean,
|
||||
public readonly message: string,
|
||||
/**
|
||||
* How we're currently sorting alerts. This is not mere interface
|
||||
* state due to truncation; on re-sort, we want to read in the file
|
||||
@@ -76,11 +76,7 @@ export class CompletedQueryInfo implements QueryWithResults {
|
||||
}
|
||||
|
||||
get statusString(): string {
|
||||
if (this.message) {
|
||||
return this.message;
|
||||
} else {
|
||||
throw new Error("No status available");
|
||||
}
|
||||
return this.message;
|
||||
}
|
||||
|
||||
getResultsPath(selectedTable: string, useSorted = true): string {
|
||||
|
||||
@@ -367,8 +367,8 @@ export class QueryEvaluationInfo extends QueryOutputDir {
|
||||
export interface QueryWithResults {
|
||||
readonly query: QueryEvaluationInfo;
|
||||
readonly logFileLocation?: string;
|
||||
readonly successful?: boolean;
|
||||
readonly message?: string;
|
||||
readonly successful: boolean;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -93,5 +93,8 @@ export function createMockQueryWithResults({
|
||||
metadata,
|
||||
} as unknown as QueryEvaluationInfo,
|
||||
successful: didRunSuccessfully,
|
||||
message: didRunSuccessfully
|
||||
? "finished in 0 seconds"
|
||||
: "compilation failed: unknown error",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user