Skip to content

Commit 3b42b67

Browse files
committed
Rename to readQueryHistoryFromFile
1 parent 76ef7ff commit 3b42b67

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

extensions/ql-vscode/src/legacy-query-server/run-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { redactableError } from "../pure/errors";
3333
export class QueryInProgress {
3434
public queryEvalInfo: QueryEvaluationInfo;
3535
/**
36-
* Note that in the {@link readFromQueryHistoryFile} method, we create a QueryEvaluationInfo instance
36+
* Note that in the {@link readQueryHistoryFromFile} method, we create a QueryEvaluationInfo instance
3737
* by explicitly setting the prototype in order to avoid calling this constructor.
3838
*/
3939
constructor(

extensions/ql-vscode/src/query-history/query-history-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
variantAnalysisStatusToQueryStatus,
4141
} from "../query-status";
4242
import {
43-
readFromQueryHistoryFile,
43+
readQueryHistoryFromFile,
4444
writeQueryHistoryToFile,
4545
} from "./store/query-history-store";
4646
import { pathExists } from "fs-extra";
@@ -379,7 +379,7 @@ export class QueryHistoryManager extends DisposableObject {
379379
void extLogger.log(
380380
`Reading cached query history from '${this.queryMetadataStorageLocation}'.`,
381381
);
382-
const history = await readFromQueryHistoryFile(
382+
const history = await readQueryHistoryFromFile(
383383
this.queryMetadataStorageLocation,
384384
);
385385
this.treeDataProvider.allHistory = history;

extensions/ql-vscode/src/query-history/store/query-history-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { QueryEvaluationInfo } from "../../run-queries-shared";
1414
import { QueryResultType } from "../../pure/legacy-messages";
1515
import { redactableError } from "../../pure/errors";
1616

17-
export async function readFromQueryHistoryFile(
17+
export async function readQueryHistoryFromFile(
1818
fsPath: string,
1919
): Promise<QueryHistoryInfo[]> {
2020
try {

extensions/ql-vscode/src/query-results.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class CompletedQueryInfo implements QueryWithResults {
7070
interpretedResultsSortState: InterpretedResultsSortState | undefined;
7171

7272
/**
73-
* Note that in the {@link readFromQueryHistoryFile} method, we create a CompletedQueryInfo instance
73+
* Note that in the {@link readQueryHistoryFromFile} method, we create a CompletedQueryInfo instance
7474
* by explicitly setting the prototype in order to avoid calling this constructor.
7575
*/
7676
constructor(evaluation: QueryWithResults) {
@@ -224,7 +224,7 @@ export class LocalQueryInfo {
224224
public evalLogSummarySymbolsLocation: string | undefined;
225225

226226
/**
227-
* Note that in the {@link readFromQueryHistoryFile} method, we create a FullQueryInfo instance
227+
* Note that in the {@link readQueryHistoryFromFile} method, we create a FullQueryInfo instance
228228
* by explicitly setting the prototype in order to avoid calling this constructor.
229229
*/
230230
constructor(

extensions/ql-vscode/src/run-queries-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function findQueryEvalLogEndSummaryFile(resultPath: string): string {
6868

6969
export class QueryEvaluationInfo {
7070
/**
71-
* Note that in the {@link readFromQueryHistoryFile} method, we create a QueryEvaluationInfo instance
71+
* Note that in the {@link readQueryHistoryFromFile} method, we create a QueryEvaluationInfo instance
7272
* by explicitly setting the prototype in order to avoid calling this constructor.
7373
*/
7474
constructor(

extensions/ql-vscode/test/vscode-tests/no-workspace/query-history/store/query-history-store.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
readFromQueryHistoryFile,
2+
readQueryHistoryFromFile,
33
writeQueryHistoryToFile,
44
} from "../../../../../src/query-history/store/query-history-store";
55
import { join } from "path";
@@ -98,7 +98,7 @@ describe("write and read", () => {
9898

9999
// write and read
100100
await writeQueryHistoryToFile(allHistory, allHistoryPath);
101-
const allHistoryActual = await readFromQueryHistoryFile(allHistoryPath);
101+
const allHistoryActual = await readQueryHistoryFromFile(allHistoryPath);
102102

103103
// the dispose methods will be different. Ignore them.
104104
allHistoryActual.forEach((info) => {
@@ -181,7 +181,7 @@ describe("write and read", () => {
181181
"utf8",
182182
);
183183

184-
const actual = await readFromQueryHistoryFile(path);
184+
const actual = await readQueryHistoryFromFile(path);
185185
expect(actual.length).toEqual(expectedHistory.length);
186186
});
187187

@@ -196,7 +196,7 @@ describe("write and read", () => {
196196
"utf8",
197197
);
198198

199-
const allHistoryActual = await readFromQueryHistoryFile(badPath);
199+
const allHistoryActual = await readQueryHistoryFromFile(badPath);
200200
// version number is invalid. Should return an empty array.
201201
expect(allHistoryActual).toEqual([]);
202202
});

0 commit comments

Comments
 (0)