Rename getResults to readQueryResults
This commit is contained in:
@@ -27,7 +27,7 @@ import { ResolvableLocationValue } from "../pure/bqrs-cli-types";
|
||||
import { showResolvableLocation } from "../interface-utils";
|
||||
import { decodeBqrsToExternalApiUsages } from "./bqrs";
|
||||
import { redactableError } from "../pure/errors";
|
||||
import { getResults, runQuery } from "./external-api-usage-query";
|
||||
import { readQueryResults, runQuery } from "./external-api-usage-query";
|
||||
import { createDataExtensionYaml, loadDataExtensionYaml } from "./yaml";
|
||||
import { ExternalApiUsage } from "./external-api-usage";
|
||||
import { ModeledMethod } from "./modeled-method";
|
||||
@@ -192,7 +192,7 @@ export class DataExtensionsEditorView extends AbstractWebview<
|
||||
maxStep: 1500,
|
||||
});
|
||||
|
||||
const bqrsChunk = await getResults({
|
||||
const bqrsChunk = await readQueryResults({
|
||||
cliServer: this.cliServer,
|
||||
bqrsPath: queryResult.outputDir.bqrsPath,
|
||||
logger: extLogger,
|
||||
|
||||
@@ -90,7 +90,7 @@ export type GetResultsOptions = {
|
||||
logger: Logger;
|
||||
};
|
||||
|
||||
export async function getResults({
|
||||
export async function readQueryResults({
|
||||
cliServer,
|
||||
bqrsPath,
|
||||
logger,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
getResults,
|
||||
readQueryResults,
|
||||
runQuery,
|
||||
} from "../../../../src/data-extensions-editor/external-api-usage-query";
|
||||
import { createMockLogger } from "../../../__mocks__/loggerMock";
|
||||
@@ -135,7 +135,7 @@ describe("getResults", () => {
|
||||
"result-sets": [],
|
||||
});
|
||||
|
||||
expect(await getResults(options)).toBeUndefined();
|
||||
expect(await readQueryResults(options)).toBeUndefined();
|
||||
expect(options.logger.log).toHaveBeenCalledWith(
|
||||
expect.stringMatching(/Expected exactly one result set/),
|
||||
);
|
||||
@@ -165,7 +165,7 @@ describe("getResults", () => {
|
||||
],
|
||||
});
|
||||
|
||||
expect(await getResults(options)).toBeUndefined();
|
||||
expect(await readQueryResults(options)).toBeUndefined();
|
||||
expect(options.logger.log).toHaveBeenCalledWith(
|
||||
expect.stringMatching(/Expected exactly one result set/),
|
||||
);
|
||||
@@ -211,7 +211,7 @@ describe("getResults", () => {
|
||||
};
|
||||
options.cliServer.bqrsDecode.mockResolvedValue(decodedResultSet);
|
||||
|
||||
const result = await getResults(options);
|
||||
const result = await readQueryResults(options);
|
||||
expect(result).toEqual(decodedResultSet);
|
||||
expect(options.cliServer.bqrsInfo).toHaveBeenCalledWith(options.bqrsPath);
|
||||
expect(options.cliServer.bqrsDecode).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user