Skip to content

refactor(soql): query plan always uses REST, no API prompt W-20246881#7018

Merged
daphne-sfdc merged 2 commits into
daphne/W-20246881-query-plannerfrom
sm/query-plan
Mar 19, 2026
Merged

refactor(soql): query plan always uses REST, no API prompt W-20246881#7018
daphne-sfdc merged 2 commits into
daphne/W-20246881-query-plannerfrom
sm/query-plan

Conversation

@mshanemc

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Remove API picker from query plan commands; always use REST API for explain
  • GetQueryInputsForPlan / GetDocumentQueryInputsForPlan gather query only

What issues does this PR fix or reference?

@W-20246881@

Made with Cursor

@mshanemc mshanemc requested a review from a team as a code owner March 19, 2026 02:25
@mshanemc mshanemc requested a review from gbockus-sf March 19, 2026 02:25
@mshanemc mshanemc changed the base branch from develop to daphne/W-20246881-query-planner March 19, 2026 02:26
*/
const runSoqlQuery = async (connection: Connection, query: string, useTooling = false): Promise<QueryResult> => {
channelService.appendLine(nls.localize('data_query_running_query'));
channelService.appendLine(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the channel logs just to make sure these worked. It's not important to keep them if you don't want to.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this 🙂

import * as vscode from 'vscode';
import { Utils } from 'vscode-uri';
import { channelService } from './services/channel';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was unused!

@@ -9,42 +9,6 @@ jest.mock('../../../src/services/channel', () => ({
channelService: { appendLine: jest.fn() },
OUTPUT_CHANNEL: {}
}));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems silly to mock i18n

@daphne-sfdc daphne-sfdc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These query plan commands work with both sObjects that were supposed to be REST API and sObjects that were supposed to be Tooling API.

  • SFDX: Get SOQL Query Plan with Currently Selected Text ✅
  • "Get Query Plan" code lens ✅
  • SFDX: Get SOQL Query Plan with Current File ✅

Executing SOQL queries:

  • SFDX: Execute SOQL Query with Currently Selected Text ✅
  • SFDX: Execute SOQL Query... ✅

@daphne-sfdc daphne-sfdc merged commit 6901037 into daphne/W-20246881-query-planner Mar 19, 2026
61 of 70 checks passed
@daphne-sfdc daphne-sfdc deleted the sm/query-plan branch March 19, 2026 17:53
daphne-sfdc added a commit that referenced this pull request Mar 20, 2026
…xt Editor View) (#7013)

* feat: new command that calls REST and Tooling APIs to get Query Plan data and print it into Output Tab

* feat: code lens + new "SFDX: Get SOQL Query Plan with Current File" command in commmand palette

* feat: format the Query Plan results in table format like Developer Console

* refactor(soql): query plan always uses REST, no API prompt W-20246881 (#7018)

* refactor: api doesn't matter for queryPlan

* fix: query plan doesn't allow you to type a query in an input box

---------

Co-authored-by: Daphne Yang <daphne.yang@salesforce.com>

* Merge branch 'develop' into daphne/W-20246881-query-planner

---------

Co-authored-by: Shane McLaughlin <shane.mclaughlin@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants