-
Notifications
You must be signed in to change notification settings - Fork 420
feat: W-18338854 - execute soql query commands don't rely on CLI anymore #6400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
// Open the file in editor | ||
const document = await vscode.workspace.openTextDocument(filePath); | ||
await vscode.window.showTextDocument(document); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running queries is an async task, do we really want to force a focus change in the UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. preserveFocus:false
would open the document but not steal focus? Or are you thinking of something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking to show the success notification and a "Open file" button in case the user wants to review it. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
|
||
// Open the file in editor | ||
const document = await vscode.workspace.openTextDocument(filePath); | ||
await vscode.window.showTextDocument(document); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. preserveFocus:false
would open the document but not steal focus? Or are you thinking of something else?
…x-vscode into cristi/queryUser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code:
❌ linter warnings are no good. I'm going to fix those with some PR/types changes.
QA notes:
✅ queries fine when entering the query
✅ good error when I do an invalid query
❌ see comment about blank line in output being non-reproducible
✅ did SELECT COUNT() FROM Property__c
from highlighted text in dreamhouse repo, got fine result
resolved (requires button click in notification to view the results csv)
What does this PR do?
This pull request introduces significant enhancements to the SOQL query execution functionality in the
dataQuery.ts
file. The changes include refactoring theDataQueryExecutor
class to use theLibraryCommandletExecutor
, improving error handling, introducing CSV export capabilities, and updating i18n messages for better user feedback.Enhancements to SOQL Query Execution:
DataQueryExecutor
to useLibraryCommandletExecutor
for improved handling of SOQL queries. Added methods for executing queries, displaying results in a table format, converting results to CSV, and saving them to a file. Enhanced error handling to provide specific messages for common issues, such as session expiration or malformed queries.Improvements to API Type Handling:
ApiType
enum to use uppercase naming (TOOLING
instead ofTooling
) for consistency.ApiType.Tooling
in theGetQueryAndApiInputs
class to align with the updated enum naming convention.Updates to i18n Messages:
What issues does this PR fix or reference?
@W-18338854@